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.

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)


REMEMBER you will need to restart apache for these changes to take effect.


Apache – Stop Apache web service from a command line

Thursday, 11. August 2011

Here is a snappy command to use to stop your apache web service from a command line.

sudo /etc/init.d/apache2 stop