Interesting Apache/LSWS Co-existence Issues

Discussion in 'Apache Migration/Compatibility' started by Xorlev, Jan 27, 2007.

  1. Xorlev

    Xorlev New Member

    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?
  2. mistwang

    mistwang LiteSpeed Staff

    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.
  3. Xorlev

    Xorlev New Member

    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.
  4. mistwang

    mistwang LiteSpeed Staff

    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.
  5. Xorlev

    Xorlev New Member

    I looked in stderr.log and I see a couple of these:

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

  6. mistwang

    mistwang LiteSpeed Staff

    You need to increase process soft/hard limit for lsphp external app.
  7. Xorlev

    Xorlev New Member

    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?
  8. mistwang

    mistwang LiteSpeed Staff

    The number of processes running as that user on the entire server.
  9. Xorlev

    Xorlev New Member

    Then you are correct. Thank you :)

Share This Page