APC trouble

Discussion in 'PHP' started by murp, May 30, 2007.

  1. murp

    murp Member


    I am having an issue with APC. The problem is that it appears to be running a separate copy of APC for each thread (or process, I'm not sure). This means that the cache keeps expiring itself when it shouldn't.

    Here is my APC info page:


    You will see that the uptime is not very long. Litespeed has actually been up for a few days already without being restarted. If you reload the page a few times, you will probably see the figures changing dramatically.

    This is causing me problems and I can't figure it out. Any help would be greatly appreciated.


  2. murp

    murp Member

    Sorry folks, I just figured this out myself.

    For anyone who finds this thread with the same problem, add an environment variable called PHP_LSAPI_CHILDREN and make it equal to the "Max Connections" variable, like this:


    Also, set instances to 1.
  3. mistwang

    mistwang LiteSpeed Staff

    Yeah, that's the right way to let all PHP process share the same opcode cache.

Share This Page