LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > Apache Migration/Compatibility > Interesting Apache/LSWS Co-existence Issues

Reply
 
Thread Tools Display Modes
  #1  
Old 01-27-2007, 08:44 AM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
Default Interesting Apache/LSWS Co-existence Issues

Let my lay out my setup here.

I have a CPanel server for my clients, and I loathe it, but my clients love it. Because of this I run CPanel with Apache for my clients. In parallel on another IP address I run LSWS for my own personal sites.

Up until now they've co-existed fine for months. Apache used PHP-5.1.6, mine PHP-5.2.0. Then I wanted to implement the Suhosin extension/patch on my PHP-5.2.0 copy. I found I couldn't get the module to build with lsws' copy of PHP (in /opt/lsws/lsphp) headers and such. Unable to do anything else, I upgrade the system PHP to 5.2.0 and was able to build the Suhosin extension successfully. Lately though, after some time (anywhere from 8-48 hours) LSWS will stop serving PHP pages. I look in the external apps section, and find that lsphp is no longer running. Rebooting LSWS doesn't help. Then I reboot Apache and all is well. This started after I moved Apache to PHP-5.2.0.

Any ideas why Apache would be affecting LSWS' PHP, especially when lsphp is in fcgi-bin?
Reply With Quote
  #2  
Old 01-27-2007, 12:47 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
I am not sure, maybe you can check the process limits in LSWS configuration, if apache, LSWS and lsphp run under the same user.

Try start lsphp under the same user from command line and see if you can start it when that happens.

LSWS 3.0 should be able to replace apache completely for a cPanel server.
Reply With Quote
  #3  
Old 01-27-2007, 01:14 PM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
I could probably replace Apache with LSWS now, but I'd prefer to keep my clients and I separated, which is why I do what I do now or it'd be all LSWS.

Running PHP then rebooting LSWS works fine. Rebooting in general works fine, it's just when the lsphp dies off it requires a reboot of Apache and LSWS. I run with a single instance, but 25 children to share a single APC cache pool.
Reply With Quote
  #4  
Old 01-27-2007, 01:37 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
When lsphp dies, try starting a lsphp from command with the same user that LSWS starts lsphp.
And you can check error.log and stderr.log see if anything suspcious.
Reply With Quote
  #5  
Old 01-27-2007, 01:44 PM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
I looked in stderr.log and I see a couple of these:

Quote:
sh: fork: Resource temporarily unavailable
And a ton of these (probably because it dies while I'm away and unable to restart):

Quote:
php (pre-forking): Resource temporarily unavailable
php (pre-forking): Resource temporarily unavailable
php (pre-forking): Resource temporarily unavailable
Reply With Quote
  #6  
Old 01-27-2007, 02:11 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
You need to increase process soft/hard limit for lsphp external app.
Reply With Quote
  #7  
Old 01-27-2007, 03:54 PM
Xorlev Xorlev is offline
Senior Member
 
Join Date: Nov 2005
Posts: 58
My limit is 200 soft/hard. Need I do more? Also, is this limit counting the number of processes from only LSWS, or across the entire server?
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 02:11 AM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.