[Solved] xCache Error

Discussion in 'General' started by sux0r, Feb 16, 2011.

  1. sux0r

    sux0r New Member

    When i switch xcache.mmap_path

    From:
    xcache.mmap_path: /dev/zero --> to anything other than this.
    It fills the error log with -->

    Code:
    [66.249.71.187:40143-0#APVH_] [STDERR] PHP Warning: xcache_isset(): xcache.var_size is either 0 or too small to enable var data caching in /home/youth/public_html/forums/ips_kernel/classCacheXcache.php on line 95
    Heres my php.ini bit about xCache.

    [​IMG]
  2. webizen

    webizen New Member

    Do you mean when you switch xcache.mmap_path to anything other than /dev/zero, you start seeing these errors? but no problem if use /dev/zero, correct?
  3. sux0r

    sux0r New Member

    Yes, exactly o_O
  4. webizen

    webizen New Member

    What other path did you change to that caused the warning? It is more of an xcache setup issue in stead of LSWS issue.
  5. sux0r

    sux0r New Member

    Tried:
    /dev/shm/
    and
    /tmp/xcache/
  6. NiteWave

    NiteWave Administrator

  7. sux0r

    sux0r New Member

    Tried /dev/shm/xcache

    As well with no luck o_O
  8. webizen

    webizen New Member

    is /dev/shm/xcache (file) writeable by the webserver running user (e.g. nobody)?
  9. sux0r

    sux0r New Member

    I corrected the permissions.
    And after tht im getting 503 errors.

    [​IMG]

    It seems one of the scripts is taking up too much memory o_O
    The current memory_limit = 128M
    Hw much do i need to increase this ?

    ~ Thanks :)
  10. NiteWave

    NiteWave Administrator

    how much is current memory soft/hard limit of lsphp5?

    Server->External App->lsphp5->
    Memory Soft Limit (bytes)
    Memory Hard Limit (bytes)

    increase it to 700M/750M(for example) and try again
  11. sux0r

    sux0r New Member

    Before it was set to the default values.
    I've set it to 700/750 and still getting the 503's
  12. NiteWave

    NiteWave Administrator

    how about disable xcache, if 503 error disappear?
  13. sux0r

    sux0r New Member

    the error only pops up wen i change
    xcache.mmap_path: /dev/zero --> to anything other than this.

    Currently i checkd with /dev/shm/xcache
  14. NiteWave

    NiteWave Administrator

    please set
    xcache.readonly_protection = on
    in php.ini

    I installed xcache 1.3.1, no 503 error when
    xcache.mmap_path = "/tmp/xcache"

    however I only did tests on phpinfo(). your 503 error is random, right?

    per my understanding, set xcache.mmap_path other than "/dev/zero", you must set
    xcache.readonly_protection = on
    as well.

    please inform if 503 error disappear or still there after change above setting.
  15. sux0r

    sux0r New Member

    Yes i tried as you've mentioned with no luck.
    And yes the errors are random.
  16. NiteWave

    NiteWave Administrator

    looks you run php in suExec mode, it's not a good idea to enable xcache/apc for it.

    how many lsphp processes are running? can estimate it with "ps -e|grep lsphp5|wc"

    each lsphp5 process will consume 70M+70M=140M xcache memory, and lsphp5 process will only run a short time once no more requests assigned to it.

    if you really want to enable xcache, run php in non-suExec mode. (but for shared hosting, usually this is not an option for security reason). in this mode, the total memory consumed by xcache will be much less since it can be shared among lsphp5 processes, and may be no more 503 error.
  17. sux0r

    sux0r New Member

    [root@sux0r ~]# ps -e|grep lsphp5|wc
    7 28 217

    I disabled suExec mode and alls working. :]
    Thanks :)

Share This Page