Zend_Cache_Exception can’t get apc memory size
Thursday, 12. April 2012
trying to run Magento indexes on command line is an excellent way to get things done rather quickly. However there are times it can be rather annoying and more so when performance enhancement measueruses such as APC cache is in place.
A common error with APC cache exception ‘Zend_Cache_Exception’ with message ‘can’t get apc memory size’ in lib/Zend/Cache.php:209 can be very annoying and if like me you have been scratching your head over this, the post may be your solution.
After soul searching I came to find out this is merely a configurations issue and the most common settings you need are these below.
extension=apc.so apc.shm_size=512 apc.num_files_hint=10000 apc.user_entries_hint=10000 apc.max_file_size=5M apc.enable_cli=1 # VERY IMPORTANT
You will need to add these entries to your apc.ini file that can be found (at least on my server)
/etc/php5/conf.d/apc.ini
REMEMBER you will need to restart apache for these changes to take effect.
Enjoy