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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > General > [solved] Max Idle Time

Reply
 
Thread Tools Display Modes
  #1  
Old 02-03-2012, 04:45 PM
John Doe John Doe is offline
Member
 
Join Date: Mar 2011
Posts: 34
Default [solved] Max Idle Time

Hello, I have been testing the last few weeks and what I discovered is that PHP caching system like Xcache do not function properly when litespeed has "Max Idle Time" set to anything higher than -1. I notice that when I set the max idle time to -1 Xcache will now cache everything without a problem.

My question is, will the be any consequences if I leave the Max Idle Time to -1?

Last edited by NiteWave; 02-06-2012 at 01:14 AM..
Reply With Quote
  #2  
Old 02-05-2012, 06:34 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
are you running php in which mode: suExec or not ?
Reply With Quote
  #3  
Old 02-05-2012, 08:19 PM
John Doe John Doe is offline
Member
 
Join Date: Mar 2011
Posts: 34
Nope, im not.
Reply With Quote
  #4  
Old 02-05-2012, 08:29 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
can you paste output of "pstree -p" under litespeed process subtree ?
Reply With Quote
  #5  
Old 02-05-2012, 10:58 PM
John Doe John Doe is offline
Member
 
Join Date: Mar 2011
Posts: 34
For some reason I cannot paste it in the forums... I just get an empty post so I attached it instead.
Attached Files
File Type: txt litespeed.txt (5.2 KB, 4 views)

Last edited by John Doe; 02-05-2012 at 11:00 PM..
Reply With Quote
  #6  
Old 02-05-2012, 11:12 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
some 8-bit characters in it and hard to read.
to resolve it, run "export LANG=C" before run "pstree -p"
Reply With Quote
  #7  
Old 02-05-2012, 11:36 PM
John Doe John Doe is offline
Member
 
Join Date: Mar 2011
Posts: 34
Code:
[root@srv01 ~]# export LANG=C
[root@srv01 ~]# pstree -p
init(1)-+-brcm_iscsiuio(11520)-+-{brcm_iscsiuio}(11521)
        |                      |-{brcm_iscsiuio}(11522)
        |                      `-{brcm_iscsiuio}(11524)
        |-cpanellogd(32676)
        |-cpdavd(32428)
        |-cphulkd(28338)
        |-cpsrvd-ssl(3663)
        |-crond(27655)
        |-dbus-daemon(11978)
        |-dccifd(12129)---dccifd(12130)-+-{dccifd}(12132)
        |                               `-{dccifd}(12134)
        |-dccm(12093)---dccm(12095)-+-{dccm}(12108)
        |                           |-{dccm}(12109)
        |                           `-{dccm}(12110)
        |-dovecot(22374)-+-dovecot-auth(22375)
        |                |-imap-login(22428)
        |                |-imap-login(22429)
        |                |-pop3-login(22426)
        |                `-pop3-login(22427)
        |-exim(14059)
        |-funcd(6138)
        |-hald(32754)---hald-runner(32755)
        |-klogd(11892)
        |-lfd(32034)
        |-litespeed(3199)-+-httpd(3201)
        |                 |-litespeed(3206)---lsphp5(3347)-+-lsphp5(1413)
        |                 |                                |-lsphp5(4013)
        |                 |                                |-lsphp5(5920)
        |                 |                                |-lsphp5(7512)
        |                 |                                |-lsphp5(7518)
        |                 |                                |-lsphp5(7702)
        |                 |                                |-lsphp5(31868)
        |                 |                                `-lsphp5(31944)
        |                 `-litespeed(3207)
        |-mysqld_safe(18049)---mysqld(18329)-+-{mysqld}(18380)
        |                                    |-{mysqld}(19484)
        |                                    |-{mysqld}(19485)
        |                                    |-{mysqld}(19581)
        |                                    |-{mysqld}(19595)
        |                                    |-{mysqld}(19762)
        |                                    |-{mysqld}(24240)
        |                                    |-{mysqld}(24255)
        |                                    |-{mysqld}(24256)
        |                                    |-{mysqld}(24257)
        |                                    |-{mysqld}(24258)
        |                                    |-{mysqld}(24495)
        |                                    |-{mysqld}(24496)
        |                                    |-{mysqld}(24497)
        |                                    |-{mysqld}(24499)
        |                                    |-{mysqld}(24500)
        |                                    |-{mysqld}(24501)
        |                                    |-{mysqld}(24502)
        |                                    |-{mysqld}(24509)
        |                                    |-{mysqld}(24510)
        |                                    |-{mysqld}(24511)
        |                                    |-{mysqld}(24534)
        |                                    |-{mysqld}(24536)
        |                                    |-{mysqld}(24539)
        |                                    |-{mysqld}(24561)
        |                                    |-{mysqld}(12019)
        |                                    |-{mysqld}(12020)
        |                                    |-{mysqld}(12023)
        |                                    |-{mysqld}(12026)
        |                                    |-{mysqld}(12027)
        |                                    |-{mysqld}(12028)
        |                                    |-{mysqld}(13485)
        |                                    |-{mysqld}(13486)
        |                                    |-{mysqld}(15521)
        |                                    |-{mysqld}(15522)
        |                                    |-{mysqld}(15526)
        |                                    |-{mysqld}(15527)
        |                                    |-{mysqld}(17493)
        |                                    |-{mysqld}(17521)
        |                                    |-{mysqld}(17522)
        |                                    |-{mysqld}(5636)
        |                                    `-{mysqld}(5637)
        |-named(11945)-+-{named}(11946)
        |              |-{named}(11947)
        |              |-{named}(11948)
        |              |-{named}(11949)
        |              |-{named}(11950)
        |              |-{named}(11952)
        |              |-{named}(11953)
        |              |-{named}(11954)
        |              |-{named}(11955)
        |              `-{named}(11956)
        |-portsentry(3239)
        |-pure-authd(25969)
        |-pure-ftpd(25965)
        |-python2.6(22377)
        |-queueprocd(32588)
        |-spamd(22222)---spamd(22302)
        |-sshd(18398)---sshd(27793)---bash(27824)---pstree(18284)
        |-syslogd(11885)
        |-tailwatchd(32748)
        `-udevd(11360)
Reply With Quote
  #8  
Old 02-06-2012, 12:10 AM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,218
Code:
        |                 |-litespeed(3206)---lsphp5(3347)-+-lsphp5(1413)
        |                 |                                |-lsphp5(4013)
        |                 |                                |-lsphp5(5920)
        |                 |                                |-lsphp5(7512)
        |                 |                                |-lsphp5(7518)
        |                 |                                |-lsphp5(7702)
        |                 |                                |-lsphp5(31868)
        |                 |                                `-lsphp5(31944)
see above, there is only one parent lsphp5 process, other lsphp5 processes are child of the parent. in this case, in-memory opcode cache(APC,XCache) are shared by all lsphp5 process. as long as parent lsphp5(3347) is not killed, the in-memory opcode cache will be resident in memory and "function well".

note: killing or starting new sub lsphp5 process, will not affect in-memory opcode cache.

so your setting "Max Idle Time=-1" may help parent lsphp5 persistent in memory and hence XCache is persistent in memory too between requests.

however set "Max Idle Time=-1" no good in shared-hosting env:
"This feature allows resources used by idle applications to be freed. It is especially useful in mass hosting environment when you need to define many applications running in setuid mode for the sake of maximum security." --- tip for "Max Idle Time" in lsws admin console.

so to determine if your XCache is purged or not, you can also check if the parent lsphp5 pid has changed. if for some reason it changed(for example, kill -9 pid), xcache is purged.
Reply With Quote
  #9  
Old 02-06-2012, 12:41 AM
John Doe John Doe is offline
Member
 
Join Date: Mar 2011
Posts: 34
Thank you for the detailed explanation. Yes, I have notice that once I set max idle time to -1 I now see (Xcache and APC) actually caching. Xcache would cancel itself every 15 minutes (Note: I have already disabled log rotation on my sever and the bandwidth stats are set to update once every 24) I set the settings like this so that I can run the sever for at least 24h before having Litespeed restart. With that being done, the only differential factor would be litespeed Max Idle Time settings and I was not able to get any cache working without having it set to -1.

Anyway, since im not ruining a hosting company these setting seem to be fine. Thank you for verify that.

Best Regards,
Jon Doe
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 11:10 PM.



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