Interesting Apache/LSWS Co-existence Issues

Xorlev

Well-Known Member
#1
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?
 

mistwang

LiteSpeed Staff
#2
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.
 

Xorlev

Well-Known Member
#3
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.
 

mistwang

LiteSpeed Staff
#4
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.
 

Xorlev

Well-Known Member
#5
I looked in stderr.log and I see a couple of these:

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

php (pre-forking): Resource temporarily unavailable
php (pre-forking): Resource temporarily unavailable
php (pre-forking): Resource temporarily unavailable
 

Xorlev

Well-Known Member
#7
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?
 
Top