[Resolved] PHP - APC Uptime 0 minutes

Discussion in 'PHP' started by JaredR26, Jul 28, 2010.

  1. JaredR26

    JaredR26 Member

    I'm having trouble with APC and php. APC constantly clears its cache, lasting at most 2 minutes, but usually closer to 30 seconds.

    I have disabled suExec through the litespeed interface and restarted the server. I'm also running suhosin if it matters.

    What else can I try?

    Last edited by a moderator: Jul 29, 2010
  2. NiteWave

    NiteWave Administrator

    after disable suExec, which user is lsphp running as ?

    please paste output of following command:
    ps -ef|grep lsphp


    pstree -p (only lshttpd subtree)
  3. JaredR26

    JaredR26 Member

    Thanks for the quick reply.

    ps -ef|grep lsphp results:

    nobody 24753 24530 0 22:25 ? 00:00:00 lsphp5
    nobody 24754 24753 2 22:25 ? 00:00:00 lsphp5
    root 24756 24700 0 22:25 pts/0 00:00:00 grep lsphp

    pstree -p output:

    | |-lshttpd(24530)---lsphp5(24941)---lsphp5(24942)
    | `-lshttpd(24531)

    If it makes a difference this is from our QA server with (almost) no load. The problem is the same on the live server, though.

  4. NiteWave

    NiteWave Administrator

    the output confirm that php suExec disabled and running as nobody

    this shouldn't happen

    | |-lshttpd(24530)---lsphp5(24941)---lsphp5(24942)
    | `-lshttpd(24531)

    just ensure the lsphp5(24941) process is running there even no access to php for some time. if lsphp5(24941) being killed after idle for a while, then the issue you observed will hapeen since APC cache is associated with a process. in this case, it's lsphp5 which pid=24941
  5. JaredR26

    JaredR26 Member

    After some time of not running...

    | |-lshttpd(24530)
    | `-lshttpd(24531)

    What does that mean/what can I need to do about it?
  6. NiteWave

    NiteWave Administrator

    tweak the settings of:
    web admin console -> Server -> External App -> lsphp5

    you can paste current settings here.
  7. JaredR26

    JaredR26 Member

    Here's our config:

    Name lsphp5

    Address uds://tmp/lshttpd/lsphp5.sock

    Notes Not Set

    Max Connections 35


    Initial Request Timeout (secs) 60

    Retry Timeout (secs) 0

    Persistent Connection Yes

    Connection Keepalive Timeout Not Set

    Response Buffering No

    Auto Start Yes

    Command $SERVER_ROOT/fcgi-bin/lsphp5

    Back Log 100

    Instances 1

    suEXEC User Not Set

    suEXEC Group Not Set

    Run On Start Up Not Set

    Max Idle Time 10

    Priority 0

    Memory Soft Limit (bytes) 450M

    Memory Hard Limit (bytes) 500M

    Process Soft Limit 200

    Process Hard Limit 200

    Thanks for all the help, Jared
  8. NiteWave

    NiteWave Administrator

    "Specifies the maximum idle time before an external application is stopped by the server. When set to -1, the external application will not be stopped by the server. Default value is -1. "

    current setting only 10 seconds
  9. JaredR26

    JaredR26 Member


    Thank you for all your help. That seemed to fix it.


Share This Page