Trying to use APC but it seems to be clearing out?

Discussion in 'PHP' started by NUTNDUN, Jun 17, 2011.

  1. webizen

    webizen Well-Known Member

    this means xcache is enabled.
  2. prandah

    prandah Well-Known Member

    hello webizen
    i have little confuse

    xcached enable

    but when i check

    [root@poseidon lsws]# fcgi-bin/lsphp5 -v
    PHP 5.2.17 (litespeed) (built: Nov 23 2011 17:33:56)
    Copyright (c) 1997-2004 The PHP Group
    Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
    [root@poseidon lsws]#
  3. webizen

    webizen Well-Known Member

    I have to take it back.

    you need to be in /usr/local/lsws/fcgi-bin/ to check lsphp5.

    for below, it is likely you are in a different directory (.../php) that has a copy of php.ini with "" in it.

    However, your fcgi-bin/lsphp5 uses a copy of php.ini with *NO* "" (xcache not enabled). that's why 'fcgi-bin/lsphp5 -v' shows no xcache. To find out which php.ini your lsphp5 uses, do following.
    So in your case, lsphp5 doesn't not have xcache enabled.
  4. prandah

    prandah Well-Known Member

    yes i have copy it to /opt/
    thanks webizen
    my problem solved now :D
  5. prandah

    prandah Well-Known Member

    i have install it
    but i still confused

    HTTP/1.0 200 OK


    -Control: private

    Pragma: private




    Sun27 Nov 2011 10:15:05 GMT


    -CacheMISS from wire.clearos.lan

    -Cache-LookupMISS from wire.clearos.lan:3128

    1.0 wire.clearos.lan:3128 (squid/2.6.STABLE21)

    how to know xcache work ?
  6. webizen

    webizen Well-Known Member

  7. prandah

    prandah Well-Known Member

    wow work like charm :D
    thanks webizen
  8. azn_romeo_4u

    azn_romeo_4u Well-Known Member

    I'm having problems. I used the build php with xcache and memcached check in the lsws admin page. I noted down the install directory for

    When I check php -v it says xcache is installed. But when I view a phpinfo on a web page no xcache is installed.

  9. NiteWave

    NiteWave Administrator

    does this file exist?
  10. prandah

    prandah Well-Known Member

    if you check from php -v i think it's wrong
    try fcgi-bin/lsphp5 -v

    if you check with php -v alsi it just chect your server
    and not your litespeed CMIIW

    example :

    Last edited: Dec 22, 2011
  11. semprot

    semprot Well-Known Member

    Here it is (while i open litespeed admin on whm)
    root@mybox [~]# pstree -p | grep litespeed
            |                  |-litespeed(28251)-+-admin_php(32375)
            |                  |                  |-{litespeed}(28253)
            |                  |                  `-{litespeed}(28254)
            |                  `-litespeed(28252)-+-lsphp5(28271)-+-lsphp5(32446)
            |                                     |-{litespeed}(28255)
            |                                     `-{litespeed}(28256)
    Here it is
    Name : lsphp5
    Address	 : uds://tmp/lshttpd/lsphp5.sock
    Notes : Not Set
    Max Connections	: 35
    Environment :
    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?
  12. NiteWave

    NiteWave Administrator

    it will help. what's your issue? "Trying to use APC but it seems to be clearing out" as titled ?
  13. semprot

    semprot Well-Known Member

    Yes.. My APC is restarted every 30mins-3 hours, (more frequent at peak traffic).
  14. NiteWave

    NiteWave Administrator

    please watch the result after set "Max idle time" -1
  15. semprot

    semprot Well-Known Member

    i've set it to -1 about 1 h ago, but my apc was restarted 20 minutes ago.. Any log that i should check?
  16. NiteWave

    NiteWave Administrator

    please memo down the pid of parent lsphp5, see if it changes too.
    in your previous post,
    parent lsphp5 pid is 28271
  17. semprot

    semprot Well-Known Member

    Here is my result now

    root@mybox[~]# pstree -p | grep litespeed
            |                  |-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?
    Last edited: May 10, 2012
  18. NiteWave

    NiteWave Administrator

    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.
  19. semprot

    semprot Well-Known Member

    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.
  20. NiteWave

    NiteWave Administrator

    grep "Server Stopped" in error log, check log entries before it.

Share This Page