Testing on a local machine.
PHP Warning: xcache_get(): xcache.var_size is either 0 or too small to enable var data caching in /var/www/queer/sites/all/modules/cacherouter/engines/xcache.php on line 35
PHP Warning: xcache_get(): xcache.var_size is either 0 or too small to enable var data caching in /var/www/queer/sites/all/modules/cacherouter/engines/xcache.php on line 78
PHP Warning: xcache_set(): xcache.var_size is either 0 or too small to enable var data caching in /var/www/queer/sites/all/modules/cacherouter/engines/xcache.php on line 88
PHP Warning: xcache_set(): xcache.var_size is either 0 or too small to enable var data caching in /var/www/queer/sites/all/modules/cacherouter/engines/xcache.php on line 99
I upped the default xcache.var_size from 4M to 64M in xcache.ini - same warnings.
What am I doing wrong?
Oh, web server = Lighty, if that make a difference. The local machine is running F11. Server=Centos with out-of-box php 5.2.
xcache.ini:
[xcache-common]
zend_extension = /usr/lib/php/modules/xcache.so
[xcache.admin]
xcache.admin.auth = On
xcache.admin.user = "xxxxxxxxx"
; xcache.admin.pass = md5($pwd)
xcache.admin.pass = "xxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
[xcache]
xcache.shm_scheme = "mmap"
xcache.size = 64M
xcache.count = 3
xcache.slots = 1K
xcache.ttl = 3600
xcache.gc_interval = 300
; Same as aboves but for variable cache
; If you don't know for sure that you need this, you probably don't
xcache.var_size = 64M
xcache.var_count = 1
xcache.var_slots = 1K
xcache.var_ttl = 3600
xcache.var_maxttl = 3600
xcache.var_gc_interval = 300
; N/A for /dev/zero
xcache.readonly_protection = Off
xcache.optimizer = On
; for *nix, xcache.mmap_path is a file path, not directory.
; Use something like "/tmp/xcache" if you want to turn on ReadonlyProtection
; 2 group of php won't share the same /tmp/xcache
; for win32, xcache.mmap_path=anonymous map name, not file path
xcache.mmap_path = "/dev/zero"
Comment | File | Size | Author |
---|---|---|---|
#18 | cacherouter-570264-fix-warnings.patch | 1.55 KB | kenorb |
Comments
Comment #1
eyecon-1 CreditAttribution: eyecon-1 commentedBTW, just testing this, I am showing hits in list_var_data (which are non-existent without this module). I have no idea to what extent performance is improved.
I assume that the cache path setting with xcache does nothing??
Comment #2
andypostLooks like this is documentation issue... could you try 6-dev version?
Maube xcache have setting to disable cache for variables like eaccelerator
Comment #3
newmediaist CreditAttribution: newmediaist commentedI am experiencing this same issue on my site - using the newest DEV build of the module.
Comment #4
andypost@newmediaist Provide more info about your xcache version
Comment #5
newmediaist CreditAttribution: newmediaist commentedSure - my setup:
XCache v1.3.0
PHP 5.3.2 w/PHP-FPM 0.6
nginx/0.6.39
I should also mention the error isn't thrown via drupal_set_message - I only see it when I run CRON via the command line (via DRUSH or similar)
Anything else I can do to help diagnose the problem, let me know...
Comment #6
andypostOh! I think it's related to command line... not sure how to debug this...
Comment #7
newmediaist CreditAttribution: newmediaist commentedI think the reason why it isn't push through Drupal's error reporting system is it is reporting as a warning - and because this is my production server warnings are not displayed publically... I don't know if it necessarily is directly correlated to being run from the command line or not.
Is there anywhere else I can check to ensure Cache Router is functioning properly w/ XCache?
Comment #8
andypostI googled around this bug and find that all caused by setting xcache.var_size
You should check that it's value is different from 0 at
admin/reports/status/php
Comment #9
newmediaist CreditAttribution: newmediaist commentedxcache.var_size set to 64...
Here are my XCache Settings (direct from admin/reports/status/php )
Directive Local Value Master Value
xcache.admin.enable_auth Off Off
xcache.cacher On On
xcache.coredump_directory no value no value
xcache.count 1 1
xcache.gc_interval 7200 7200
xcache.mmap_path /dev/zero /dev/zero
xcache.readonly_protection no value no value
xcache.shm_scheme mmap mmap
xcache.size 64M 64M
xcache.slots 8K 8K
xcache.stat Off Off
xcache.test no value no value
xcache.ttl 7200 7200
xcache.var_count 1 1
xcache.var_gc_interval 300 300
xcache.var_maxttl 0 0
xcache.var_size 64M 64M
xcache.var_slots 8K 8K
xcache.var_ttl 0 0
Comment #10
newmediaist CreditAttribution: newmediaist commentedAny update on this issue? Drupal sees the right xcache.var_size, so that doesn't seem to be the problem...
Comment #11
newmediaist CreditAttribution: newmediaist commentedHere is the answer - Xcache not supported in PHP CLI
http://xcache.lighttpd.net/ticket/228
Comment #12
goldlilys CreditAttribution: goldlilys commentedGetting similar error
Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /sites/all/modules/cacherouter/engines/xcache.php on line 35
Warning: xcache_get() [function.xcache-get]: xcache.var_size is either 0 or too small to enable var data caching in /sites/all/modules/cacherouter/engines/xcache.php on line 78
Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /sites/all/modules/cacherouter/engines/xcache.php on line 88
Warning: xcache_set() [function.xcache-set]: xcache.var_size is either 0 or too small to enable var data caching in /sites/all/modules/cacherouter/engines/xcache.php on line 99
Warning: Cannot modify header information - headers already sent by (output started at /sites/all/modules/cacherouter/engines/xcache.php:35) in /includes/bootstrap.inc on line 725
Warning: Cannot modify header information - headers already sent by (output started at /sites/all/modules/cacherouter/engines/xcache.php:35) in /includes/bootstrap.inc on line 726
Warning: Cannot modify header information - headers already sent by (output started at /sites/all/modules/cacherouter/engines/xcache.php:35) in /includes/bootstrap.inc on line 727
Warning: Cannot modify header information - headers already sent by (output started at /sites/all/modules/cacherouter/engines/xcache.php:35) in /includes/bootstrap.inc on line 728
Fatal error: Call to undefined function filter_xss() in /includes/common.inc on line 655
My settings.php looks like:
$conf['cache_inc'] = './sites/all/modules/cacherouter/cacherouter.inc';
$conf['cacherouter'] = array(
'default' => array(
'engine' => 'xcache',
'servers' => array(),
'shared' => TRUE,
'prefix' => 'gallery',
'path' => 'sites//files/filecache',
'static' => FALSE,
'fast_cache' => TRUE,
),
);
xcache settings:
XCache Support enabled
Version 1.3.2
Modules Built cacher
Readonly Protection N/A
Cache Init Time 2011-07-19 03:35:14
Cache Instance Id 5514
Opcode Cache enabled, 536,870,912 bytes, 1 split(s), with 134217728 slots each
Variable Cache enabled, 536,870,912 bytes, 1 split(s), with 8192 slots each
Shared Memory Schemes mmap
Directive Local Value Master Value
xcache.admin.enable_auth On On
xcache.cacher On On
xcache.coredump_directory no value no value
xcache.count 1 1
xcache.gc_interval 300 300
xcache.mmap_path /dev/zero /dev/zero
xcache.readonly_protection no value no value
xcache.shm_scheme mmap mmap
xcache.size 512M 512M
xcache.slots 128M 128M
xcache.stat On On
xcache.test 0 0
xcache.ttl 7200 7200
xcache.var_count 1 1
xcache.var_gc_interval 300 300
xcache.var_maxttl 0 0
xcache.var_size 512M 512M
xcache.var_slots 8K 8K
xcache.var_ttl 0 0
And using php CGI, not CLI. But still getting that error.
What am I doing wrong?
Comment #13
goldlilys CreditAttribution: goldlilys commentedNot sure if this affects things, but i have this enabled:
This program makes use of the Zend Scripting Language Engine:
Zend Engine v2.2.0, Copyright (c) 1998-2010 Zend Technologies
with XCache v1.3.2, Copyright (c) 2005-2011, by mOo
with the ionCube PHP Loader v3.3.20, Copyright (c) 2002-2010, by ionCube Ltd.
Comment #14
kenorb CreditAttribution: kenorb commentedThe same problem when enabling the module in drush.
My settings:
It doesn't happens in the browser and the variables are normally cached.
Comment #15
kenorb CreditAttribution: kenorb commentedRelated: http://stackoverflow.com/questions/2976829/xcache-var-size-error
Comment #16
kenorb CreditAttribution: kenorb commentedAs stated here:
http://xcache.lighttpd.net/ticket/228
Comment #17
kenorb CreditAttribution: kenorb commentedActually it can be fixed by checking if the module is run in CLI, then we can ignore executing these functions.
Comment #18
kenorb CreditAttribution: kenorb commentedComment #19
kenorb CreditAttribution: kenorb commentedVersion 6.x is no longer supported due to Drupal 6 End of Life.