LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > External Applications > PHP > [Resolved] PHP - APC Uptime 0 minutes

Reply
 
Thread Tools Display Modes
  #1  
Old 07-27-2010, 06:28 PM
JaredR26 JaredR26 is offline
New Member
 
Join Date: Jul 2010
Posts: 5
Default [Resolved] PHP - APC Uptime 0 minutes

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 NiteWave; 07-28-2010 at 06:45 PM..
Reply With Quote
  #2  
Old 07-27-2010, 06:55 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,217
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)
Reply With Quote
  #3  
Old 07-27-2010, 08:30 PM
JaredR26 JaredR26 is offline
New Member
 
Join Date: Jul 2010
Posts: 5
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
Reply With Quote
  #4  
Old 07-27-2010, 08:56 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,217
the output confirm that php suExec disabled and running as nobody

Quote:
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
Reply With Quote
  #5  
Old 07-27-2010, 09:00 PM
JaredR26 JaredR26 is offline
New Member
 
Join Date: Jul 2010
Posts: 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?
Reply With Quote
  #6  
Old 07-27-2010, 09:20 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,217
tweak the settings of:
web admin console -> Server -> External App -> lsphp5

you can paste current settings here.
Reply With Quote
  #7  
Old 07-27-2010, 09:37 PM
JaredR26 JaredR26 is offline
New Member
 
Join Date: Jul 2010
Posts: 5
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
Reply With Quote
  #8  
Old 07-27-2010, 09:45 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,217
change
Quote:
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
Reply With Quote
  #9  
Old 07-28-2010, 07:47 AM
JaredR26 JaredR26 is offline
New Member
 
Join Date: Jul 2010
Posts: 5
Default Resolved

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

Jared
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:48 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.