Magento – Magento running out of memory

magento-1.8memory

Every time I am getting the following message:

Fatal error: Allowed memory size of 268435456 bytes exhausted (tried
to allocate 81 bytes) in /public_html/lib/Varien/Object.php on line
270

However, I already have php_value memory_limit 2048M in my .htaccess .which is kinda ridiculous.

Is there a way to see why its using loads of memory?

Best Answer

To see current memory limit you can use php function phpinfo()

I assume setting memory limit with .htaccess file is not supported at the sever, so you can try other options:

1) In the file index.php add line

ini_set('memory_limit', '2048M');

2) For the cgi/fastcgi run mode you can try to add file .user.ini as follows:

memory_limit = 2048M

After this please re-start web server or manually remove already running process.

3) If you have access to the php.ini file, then you can adjust the memory_limit value in this file also.

If all options do not work, please call you hosting provider support team :)

Related Topic