Topic on Project:Support desk

"CACHE_ACCEL requested but no suitable object cache is present."

8
Bluesoju (talkcontribs)

Hi, My wiki is on a VPS on dreamhost and has xcache enabled. Today after logging in, it asked me to upgrade my php to 5.3 (which was long overdue on dreamhost). Anyway, after doing that I went to my wiki and I noticed I got a message:

CACHE_ACCEL requested but no suitable object cache is present. You may want to install APC.

Backtrace:

#0 [internal function]: ObjectCache::newAccelerator(Array)
#1 /home/kingkwon/koreanwikiproject.com/wiki/includes/objectcache/ObjectCache.php(62): call_user_func('ObjectCache::ne...', Array)
#2 /home/kingkwon/koreanwikiproject.com/wiki/includes/objectcache/ObjectCache.php(50): ObjectCache::newFromParams(Array)
#3 /home/kingkwon/koreanwikiproject.com/wiki/includes/objectcache/ObjectCache.php(23): ObjectCache::newFromId(3)
#4 /home/kingkwon/koreanwikiproject.com/wiki/includes/GlobalFunctions.php(3816): ObjectCache::getInstance(3)
#5 /home/kingkwon/koreanwikiproject.com/wiki/includes/Setup.php(439): wfGetMainCache()
#6 /home/kingkwon/koreanwikiproject.com/wiki/includes/WebStart.php(157): require_once('/home/kingkwon/...')
#7 /home/kingkwon/koreanwikiproject.com/wiki/index.php(54): require('/home/kingkwon/...')
#8 {main}

I don't know if upgrading the php broke it, or if it was broken beforehand. I've tried changing the php back to 5.2 and tried 5.4 as well and no luck so far. I have no idea how to proceed. Any help would be appreciated. Thanks

88.130.123.192 (talkcontribs)
Bluesoju (talkcontribs)

What should I adjust it to? Previously it had no problem picking up xcache automatically, why not now?

Bawolff (talkcontribs)

Make sure that XCache is installed with the new version of PHP. The most likely cause is the new version of PHP simply doesn't have xcache installed. You can do this by creating a php file with just the code <?php phpinfo(); and then viewing it in a web browser.

Setting $wgMainCacheType = CACHE_NONE; will disable all caching, which would prevent the error, but make things slow.

Leucosticte (talkcontribs)

I have the same problem using DreamHost VPS with MW 1.23. Also, when I try to install a new MediaWiki installation (v1.25), I get "Warning: Could not find APC, XCache or WinCache. Object caching is not enabled."

Florianschmidtwelzow (talkcontribs)

It's the same problem :) Without any object cache, you can not use object caches. You should try to install php with XCache or something similar, or just disable object caching like Bawolff said.

Leucosticte (talkcontribs)

Well, phpinfo() says XCache is present. DreamHost tech support writes:

This message is normal. The configuration we use for PHP is, unfortunately, not compatible with using XCache as an object cache for applications such as MediaWiki. Attempting to enable it will result in unreliable behavior (e.g, users in MediaWiki not staying logged in, or edits to pages sometimes not taking effect).

XCache does still work as a PHP opcode cache, though. This is sufficient to speed up PHP applications (again, such as MediaWiki) by quite a bit; the object cache functionality is not crucial.

Thanks! Andrew F

Ralfthewise (talkcontribs)

One thing to check is that you have a valid config for xcache in php.ini (or the appropriate alternative config file). I was having the same problem and it was because I didn't have some of the following entries:

xcache.size = 60M
xcache.var_size = 4M

Have a look at the xcache.ini that is shipped with xcache for the possible variables to define.

Reply to ""CACHE_ACCEL requested but no suitable object cache is present.""