I'm in the middle of setting up some new servers (2 webservers behind a load balancer) and have decided to use apc as my main backend cache and the file system as the slow backend.
When I try to run the site I get the following errors:
Notice: Undefined index: data in /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Backend/TwoLevels.php on line 250
#0 /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Backend/TwoLevels.php(250): mageCoreErrorHandler(8, 'Undefined index...', '/var/www/html/h...', 250, Array)
#1 /var/www/html/site/releases/20130726082711/lib/Zend/Cache/Core.php(303): Zend_Cache_Backend_TwoLevels->load('HP_CORE_CACHE_O...', false)
#2 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(339): Zend_Cache_Core->load('CORE_CACHE_OPTI...')
#3 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(432): Mage_Core_Model_Cache->load('core_cache_opti...')
#4 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Cache.php(469): Mage_Core_Model_Cache->_initOptions()
#5 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(1137): Mage_Core_Model_Cache->canUse('config')
#6 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Config.php(412): Mage_Core_Model_App->useCache('config')
#7 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/Config.php(294): Mage_Core_Model_Config->_canUseCacheForInit()
#8 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(395): Mage_Core_Model_Config->loadModulesCache()
#9 /var/www/html/site/releases/20130726082711/app/code/core/Mage/Core/Model/App.php(329): Mage_Core_Model_App->_initModules()
#10 /var/www/html/site/releases/20130726082711/app/Mage.php(637): Mage_Core_Model_App->run(Array)
#11 /var/www/html/site/releases/20130726082711/index.php(88): Mage::run('', 'store')
#12 {main}
I'm using Capistrano to deploy which means the cache folder for the filesystem is held on a symlinked directory but this obviously works as it does write into the folder. Anyone else come across this and know what I need to do to sort it?
2 Answers 2
My recommendation would be to ditch APC for everything but the PHP byte code cache and use Redis as your cache back end. It works very well, does not require use of the file-system for tagging. APC is known to cause some fairly difficult to debug/reproduce/etc issues, and it will not perform as well as Redis.
Ended up being permission problems. The var/cache folders hadn't been created on Capistrano setup and when they were they had the wrong permissions. Fixed them and it all worked.
$array = unserialize($res);and leading up to that$res = $this->_fastBackend->load($id, $doNotTestCacheValidity); if ($res === false) { $res = $this->_slowBackend->load($id, $doNotTestCacheValidity); if ($res === false) { // there is no cache at all for this id return false; } }Thus $res is not false, but does not contain the right data.