0

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?

asked Aug 5, 2013 at 13:41
2
  • Hi, Looking at the code leading up to the issue, in that function, the array gets built from $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. Commented Aug 6, 2013 at 2:21
  • What exactly is in $res at that point? It may help to use a debugger and step into '$this->_slowBackend->load($id, $doNotTestCacheValidity);' and see what is actually happening in there. Commented Aug 6, 2013 at 2:25

2 Answers 2

1

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.

answered Aug 6, 2013 at 3:49
0

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.

answered Aug 7, 2013 at 8:17

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.