Many lsphp Processes

Discussion in 'Install/Configuration' started by bkonia, Oct 19, 2005.

  1. bkonia

    bkonia New Member

    I'm running PHP 5.0.5 with LSAPI configured as follows:

    Max Connections = 300
    Instances = 1
    PHP_LSAPI_CHILDREN=300

    The server is practically idling (one active HTTP request), yet when I do a ps -A, I see that I have 300 lsphp processes running. Is this the way it's supposed to be?

    I was under the impression that if Instances = 1, it would only launch a single lsphp process. I apologize if my knowledge of Linux processes is lacking, but is PS supposed to show all the child processes, or just the parent process?

    Also, isn't it supposed to kill the process when it's done? Why would I have 300 active processes with only a single page request?
  2. ts77

    ts77 New Member

    no, that means that one parent-process spawns 300 child processes.
    lsws has no control of them other than of the parent-process.

    so there will be always 300 processes, even if 299 of them are idle or something.
  3. mistwang

    mistwang LiteSpeed Staff

    Like Thomas said, that's normal if you configured PHP like that.

    If you want LSWS spawns LSAPI PHP processes on demand, you can remove
    PHP_LSAPI_CHILDREN=300, and set Instances to 300, but one drawback with this thought, each PHP process will create it own shared memory for opcode cache.

    And I think you don't really need to set Max connections to 300, 50 is more than enough for most web sites. :)

Share This Page