__color__	__group__	ticket	summary	component	milestone	type	created	_changetime	_description	_reporter
1	moo	291	Wrong path for same ??? file	cacher	undecided	defect	2012-11-06T18:21:44+0100	2013-03-21T19:11:55+0100	"Hello,

On shared architecture I have a strange problem when Xcache is enabled. Sometimes I see it on logs :

include(/home/nfs/www/www.website1.com/httpdocs/footer.php): failed to open stream: Permission denied in /home/nfs/www/www.website2.com/httpdocs/index.php on line 13

I don't know why, but sometime ""cache"" for include is currupted and try to include file /home/nfs/www/www.website1.com/httpdocs/footer.php instead of /home/nfs/www/www.website2.com/httpdocs/footer.php

It's a really really big problem :/

This is on Debian whis Dotdeb package with files shared by NFS."	Steuf
4	moo	289	class loading fails using stream_wrapper_register for the file:// protocol with xcache enabled	cacher	undecided	defect	2012-09-25T12:14:25+0200	2012-09-26T15:14:40+0200	"I am using a proxy filestream wrapper which takes notes of modifying file operations. For each operation it unregisters it self and executes the operation using the respective php function, and than registers it self again as the wrapper for the file:// protocol.

As soon as xcache is enabled, and the proxy wrapper is used, php fails to load the file wrapper class in  stream_wrapper_register('file', __CLASS__)

I concluded that xcache should use the &php_plain_files_wrapper and not a class which can't get loaded because the stream wrapper is unregistered just before that.

I wrote a small patch for the 2.0.1 version which enables the &php_plain_files_wrapper for xcache and restores the original as soon as xcache is done compiling of the php code

gcc version: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
php version: PHP 5.3.5-0.dotdeb.1 with Suhosin-Patch (built: Jan 18 2011 13:18:29)"	ferengee
4	moo	268	choosing specified cache slot for xcache_set	cacher	3.0.2	enhancement	2011-12-08T17:52:52+0100	2012-07-18T15:34:34+0200	"I would like to suggest an optional paramter for xcache_set to specify a certain variable cache (var#0, var#1 etc).  

For me and maybe others it would be very useful, because I am caching one information object that is very large and many small ones. If I were able to specify the variable cache, I could ensure that the 
large object and the small objects stay in different caches. Otherwise the small objects may end up in positions, so that there is not enough continuous room left for the large object. "	digi1
3	moo	253	lazy stat (was: reduce the number of fstat call to help server on SAN and network file servers)	cacher	3.0.2	enhancement	2010-10-19T20:32:04+0200	2012-07-13T17:58:24+0200	"Adding a parameter to indicate a modification time check delay for php opcode cache can help reduce the load for php server with root directory on a SAN or any network file system. The fstat cost with such setup is much higher than on local filesystem.

This can be implemented this way:

Adding a struct member with the last m_time check in the cache entry.
Check this entry and compare it with the request time, if the last check is within the specified delay (10 seconds for example), use the cache entry as is.
If the last check time is older, read the m_time, update the last check time and do the timestamp compare as now.

"	sam@…
3	moo	242	xcache_get() For Multiple Keys	cacher	4.0.0	enhancement	2010-04-28T21:59:13+0200	2012-07-16T11:04:23+0200	"It would be really nice if xcache_get() worked in a similar fashion to how Memcache:get() works...

http://www.php.net/manual/en/function.memcache-get.php

If you pass it a string, it returns the key requested (just like xcache_get() currently works), but if you pass it an array, it will return an array of those keys.  So you are able to optionally get a bunch of keys in one pass.  Changing how it works if you passed an array to it should be backwardly compatible since it would still work the same if you pass a string to it."	digitalpoint
3	moo	241	Compiled Code For eval()	cacher	4.0.0	enhancement	2010-04-26T09:11:57+0200	2012-03-26T14:37:54+0200	"The biggest performance issue we see these days is there is no good way to eval compiled code.

It would be *really* nice if XCache could intercept eval() calls, generate a md5 hash based on the code to be run, compile that code with the md5 as the internal key if the key isn't already compiled/stored in memory.  Then execute the compiled version of the code."	digitalpoint
3	moo	179	xcache_set/get Multiple Keys	cacher	3.0.2	enhancement	2008-05-31T17:17:18+0200	2012-07-16T11:03:52+0200	"一般情况下，在执行的 PHP 脚本中，很少会只用一次两次的 var cache。

都会这么写：
foreach ($data AS $key => $value)
{
    xcache_set($key, $value, $ttl);
}

xcache_get 也基本上差不多，尤其在把数据库的记录当作一个 key -> value 对存在的时候，往往做一个列表页的情况下，会进行很大批量的 get 和 set 操作。从性能开销的考虑来看，由 xcache 支持批量操作，速度会提升 5-10 倍。目前 APC 和 MEMCACHE 的 get 操作都支持批量 key 的存取。我想除了方便的角度，也有性能提升的考虑吧。

我设想增加 xcache_gets API，原型为：

array xcache_gets(array $keys, [array &$unget_keys])

变量 keys 为一批 key，变量 unget_keys 为在缓存中未获得到的 key 的数组。方便后期代码中进行数据的获取，而不需要再进行循环操作。

如果可以的话，也可以增加 xcache_sets 函数，原型为：

bool xcache_sets(array $data, $ttl)

变量 $data 为 key -> $value 对。

以上建议请希望开发者慎重考虑～"	paulgao@…
4	moo	176	xcache_isset support XC_TYPE_PHP	cacher	4.0.0	defect	2008-05-10T21:57:49+0200	2012-07-13T17:10:48+0200	"Why xcache_isset do not support check, if a specific php file is cached or not?
Can be secure and more faster than file_exists before includes.
"	anonymous
3	moo	147	solaris, apache2.0 worker mpm: xc_fcntl_lock failed errno:13x	cacher	4.0.0	defect	2007-11-11T01:32:19+0100	2012-07-13T17:14:54+0200	"
(see configuration details at the end)

I was testing an XCache installation by request URL's from 6 concurrent clients.  I noticed these messages in the apache error log:

   xc_fcntl_lock failed errno:13


There were dozes of this message, with no endlines.  When I changed xcache.count=1 to 2, I could not reproduce the error message.

Dual PIII

Solaris 9

Apache 2.0.59 w/ Worker MPM

PHP 5.2.4

XCache 1.2.1:

   zend_extension_ts = /opt/php/lib/php/extensions/no-debug-zts-20060613/xcache.so

   xcache.shm_scheme =        ""mmap""

   xcache.shm_scheme =        ""mmap""

   xcache.size  =               64M

   xcache.count =                 2

   xcache.slots =                8K

   xcache.ttl   =                 0

   xcache.gc_interval =           300

   xcache.var_size  =            64M

   xcache.var_count =             1

   xcache.var_slots =            8K

   xcache.var_ttl   =             0

   xcache.var_maxttl   =          0

   xcache.var_gc_interval =     300

   xcache.test =                Off

   xcache.readonly_protection = Off

   xcache.mmap_path =    ""/opt/apache/logs/xcache.mem""

   xcache.coredump_directory =   ""/var/tmp""

   xcache.cacher =               On

   xcache.stat   =               On

   xcache.optimizer =           Off

   xcache.coverager =          Off

   xcache.coveragedump_directory = """"
"	crozierm@…
3	moo	95	Memory is not free()'d after xcache_get() data is unset	cacher	3.0.2	defect	2007-05-15T08:41:33+0200	2010-03-20T03:35:02+0100	"I've tested EA vs XCache performance on cache reads and got the following problem:

Code:
{{{
#!php
<?php
	function ea_read ($max) # void
	{
		global $DATA;

		for($i = 0;$i<10;$i++)
		{
			$key[$i] = 'some_key_'.$i;
			eaccelerator_put($key[$i], $DATA);
		}

		for($i = 0;$i<$max;$i++)
			$val = eaccelerator_get($key[$i%10]);
	}

	function xcache_read ($max) # void
	{
		global $DATA;

		for($i = 0;$i<10;$i++)
		{
			$key[$i] = 'some_key_'.$i;
			xcache_set($key[$i], $DATA);
		}

		for($i = 0;$i<$max;$i++)
		{
			$val = xcache_get($key[$i%10]);
		}
	}
}}}
Result ($max = 10000):
{{{
#!php
<?php
    $DATA = str_repat('x',10000); 
}}}
Everything is ok.
{{{
#!php
<?php
    $DATA = array_map('uniqid', range(1,10));
}}}
Fatal error: Allowed memory size of 16777216 bytes exhausted (tried to allocate 15 bytes).

It seems that XCache somehow marks array items that they aren't released (may be it increases ref_count?). I tried to add ""unset($val);"" after ""$val = xcache_get();"" but it didn't help.

The only solution I've found is:
{{{
#!php
<?php
   xcache_set($key,serialize($data));
   $val = unserialize(xcache_get($key));
}}}
but it looks weird (and slows down xcache calls) ..."	krogot
3	moo	53	500 error with Wordpress	coverager	undecided	defect	2006-11-17T12:14:51+0100	2012-03-26T14:37:24+0200	"Hi, I'm seeing a 500 error returned in Wordpress.  It is fixed with
either a restart of the php fastcgi processes, or clearing the xcache
cache from the xcache admin page.

It is not with all Wordpress pages, so far I've seen it when posting a
comment.  Posting comments works fine for a few hours/days then
consistently returns a 500 error.

This is with php5-cgi 5.1.2-1ubuntu3.4 package on Ubuntu Dapper running
as a fastcgi process under lighttpd. It's with xcache 1.1.0 compiled
from source (and observed from at least xcache trunk svn r262).

I get no error output from php (to the error_log or php stderr) when
accessing the broken page (though I know php error logging to be
working).

I think the php script causing the problem is wp-comments-post.php but
I've got a couple of comment related plugins installed, such as Akismet
and a threaded comments plugin.

I've got other Wordpress installations on the same box which *reportedly* had the
same problem (but at different times), though I've not seen it myself.

I'm getting no coredump on the error.
{{{
root@mule:~# gcc -v
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v
--enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr
--enable-shared --with-system-zlib --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --enable-nls
--program-suffix=-4.0 --enable-__cxa_atexit --enable-clocale=gnu
--enable-libstdcxx-debug --enable-java-awt=gtk-default
--enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre
--enable-mpfr --disable-werror --with-tune=pentium4
--enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.0.3 (Ubuntu 4.0.3-1ubuntu5)

root@mule:~# php-cgi -v
PHP 5.1.2 (cgi-fcgi) (built: Nov  2 2006 12:24:48)
Copyright (c) 1997-2006 The PHP Group
Zend Engine v2.1.0, Copyright (c) 1998-2006 Zend Technologies
    with XCache v1.1.0, Copyright (c) 2005-2006, by mOo
}}}"	johnleach
