[Resolved] PHP - APC Uptime 0 minutes

#1
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?

Jared
 
Last edited by a moderator:

NiteWave

Administrator
#2
after disable suExec, which user is lsphp running as ?

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

and

pstree -p (only lshttpd subtree)
 
#3
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(24528)-+-httpd(24529)
| |-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.

Jared
 

NiteWave

Administrator
#4
the output confirm that php suExec disabled and running as nobody

APC constantly clears its cache, lasting at most 2 minutes, but usually closer to 30 seconds.
this shouldn't happen

|-lshttpd(24528)-+-httpd(24529)
| |-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
After some time of not running...

|-lshttpd(24528)-+-httpd(24529)
| |-lshttpd(24530)
| `-lshttpd(24531)

What does that mean/what can I need to do about it?
 
#7
Here's our config:

Name lsphp5

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

Notes Not Set

Max Connections 35

Environment
PHP_LSAPI_MAX_REQUESTS=500
PHP_LSAPI_CHILDREN=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
 

NiteWave

Administrator
#8
change
Max Idle Time 10
"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
 
Top