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

Go Back   LiteSpeed Support Forums > External Applications > PHP > Trying to use APC but it seems to be clearing out?

Reply
 
Thread Tools Display Modes
  #51  
Old 05-08-2012, 07:36 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
maybe you refer:
http://xcache.lighttpd.net/wiki/Faq#...hebeingcleared

then how many litespeed processes are running on your server?
#pstree -p | grep litespeed

what you observed is just the reason why on shared hosting environment, only eAccelerator is recommended. all php processes can share the opcode cache under a single disk folder, like /tmp/eaccelerator. usually, php suExec is enabled in such environment. APC and XCache only keep opcode cache in memory. so each group of php processes will have its own cache.
Here it is (while i open litespeed admin on whm)
Code:
root@mybox [~]# pstree -p | grep litespeed
        |-litespeed(28249)-+-httpd(28250)
        |                  |-litespeed(28251)-+-admin_php(32375)
        |                  |                  |-{litespeed}(28253)
        |                  |                  `-{litespeed}(28254)
        |                  `-litespeed(28252)-+-lsphp5(28271)-+-lsphp5(32446)
        |                                     |-{litespeed}(28255)
        |                                     `-{litespeed}(28256)
Quote:
Originally Posted by NiteWave View Post
ok, this suggest me might that reason ....
please post the lsphp5's setting:
Server -> External App -> lsphp5: View
Here it is
Code:
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) : 1024M
Memory Hard Limit (bytes) : 1024M
Process Soft Limit : 500
Process Hard Limit : 500
What setting should i change? Max idle time to -1?
__________________
I use litespeed
Reply With Quote
  #52  
Old 05-08-2012, 07:59 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
Quote:
Max idle time to -1?
it will help. what's your issue? "Trying to use APC but it seems to be clearing out" as titled ?
Reply With Quote
  #53  
Old 05-08-2012, 08:07 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
it will help. what's your issue? "Trying to use APC but it seems to be clearing out" as titled ?
Yes.. My APC is restarted every 30mins-3 hours, (more frequent at peak traffic).
__________________
I use litespeed
Reply With Quote
  #54  
Old 05-08-2012, 08:20 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
please watch the result after set "Max idle time" -1
Reply With Quote
  #55  
Old 05-08-2012, 10:29 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
please watch the result after set "Max idle time" -1
i've set it to -1 about 1 h ago, but my apc was restarted 20 minutes ago.. Any log that i should check?
__________________
I use litespeed
Reply With Quote
  #56  
Old 05-09-2012, 07:45 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
Quote:
my apc was restarted 20 minutes ago..
please memo down the pid of parent lsphp5, see if it changes too.
in your previous post,
Quote:
litespeed(28252)-+-lsphp5(28271)-+-lsphp5(32446)
parent lsphp5 pid is 28271
Reply With Quote
  #57  
Old 05-09-2012, 07:58 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
please memo down the pid of parent lsphp5, see if it changes too.
in your previous post,

parent lsphp5 pid is 28271
Here is my result now

Code:
root@mybox[~]# pstree -p | grep litespeed
        |-litespeed(10551)-+-httpd(10552)
        |                  |-litespeed(10553)-+-lsphp5(10559)-+-lsphp5(14546)
        |                  |                  |-{litespeed}(10555)
        |                  |                  `-{litespeed}(10556)
        |                  `-litespeed(10554)-+-lsphp5(10595)-+-lsphp5(13525)
        |                                     |-{litespeed}(10557)
        |                                     `-{litespeed}(10558)
Yes it is changed now, so it seems litespeed was restarted?
__________________
I use litespeed

Last edited by semprot; 05-09-2012 at 08:01 PM..
Reply With Quote
  #58  
Old 05-09-2012, 08:06 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
yes, if pid of litespeed changed, it must have been restarted.

litespeed may restart to fix 503 error automatically.
in a site with buggy php script, this may be helpful without whole site down.
Reply With Quote
  #59  
Old 05-09-2012, 08:16 PM
semprot semprot is offline
Member
 
Join Date: Apr 2012
Posts: 41
Quote:
Originally Posted by NiteWave View Post
yes, if pid of litespeed changed, it must have been restarted.

litespeed may restart to fix 503 error automatically.
in a site with buggy php script, this may be helpful without whole site down.
Usually when i got an 503 error and LS was restarted, i got an e-mail notification. Why i didn't get any notification?

Is there any log that i can check to see why it happened?
I tried to open "Server Log Viewer" but there are too many.
__________________
I use litespeed
Reply With Quote
  #60  
Old 05-09-2012, 08:44 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,216
grep "Server Stopped" in error log, check log entries before it.
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 01:39 AM.



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