[Solved] xCache Error

sux0r

Well-Known Member
#1
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.

 

webizen

Well-Known Member
#2
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?
 

sux0r

Well-Known Member
#9
I corrected the permissions.
And after tht im getting 503 errors.



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
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
 

sux0r

Well-Known Member
#13
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
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.
 
#16
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.
 

semprot

Well-Known Member
#19
Why did you try other than /dev/zero/ ?
When i tried /dev/shm/ , it gave me error too, so i use /dev/zero/ now.
Does changing it other than /dev/zero/ will give significant boost?
 

skooboy

Active Member
#20
I can't seem to get it to work with anything other than "dev/zero". Can someone write detailed step-by-step instructions on how to make it work with "/dev/shm/zero"? Don't assume everyone knows how to set the proper permissions/ownership. :) Thanks!
 
Top