PHP LSAPI process limit ignored?

Discussion in 'PHP' started by apotheus, Jun 23, 2008.

  1. apotheus

    apotheus New Member

    I've had Litespeed up and running successfully on a 3 server web farm for a couple months now. The only real problem I haven't been able to correct on my own is how to properly limit the number of simultaneous PHP processes.

    In my server config for the PHP external app I have:
    However the real-time stats page shows Max CONN and Eff Max for the PHP external app as 800 and the server routinely has 120-150 lsphp processes even when only a few are being used. I searched the text of the various lsws config files and the number 800 isn't anywhere to be found in them.

    The number of processes needs to be limited because of the connection limit at our master database server. The connection limit is currently 600 and I would really only expect 300 (100 x 3 servers) connections at any one time. When that server gets tied up with something I routinely get "max connections exceeded" errors from MySQL. That tells me the limits are being ignored or I've done something wrong.

    Is there something wrong with my configuration?
  2. mistwang

    mistwang LiteSpeed Staff

    As each lshttpd will start its own group of lsphp processes, with 8-CPU license, the Max CONN will be 100 X 8, so if you want to have the real limit to be 200, You should set

    Max Connections: 30

    Process limit should be increase to something like
    Process Soft Limit: 400
    Process Hard Limit: 450
  3. apotheus

    apotheus New Member

    That makes sense - I didn't realize multiple CPUs had anything to do with it. Thanks! :D

Share This Page