![]() |
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? |
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. |
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. |
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. |
I looked in stderr.log and I see a couple of these:
Quote:
Quote:
|
You need to increase process soft/hard limit for lsphp external app.
|
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?
|
The number of processes running as that user on the entire server.
|
Then you are correct. Thank you :)
|
| All times are GMT -7. The time now is 07:26 AM. |