cancel
Showing results for 
Search instead for 
Did you mean: 

Fatal error: Allowed memory size of xx bytes exhausted (tried to allocate xx bytes) in /home/...php

Fatal error: Allowed memory size of xx bytes exhausted (tried to allocate xx bytes) in /home/...php

Hi, I'm new to Magento. Please help me with the above error which I am getting when I try to save a product. Magento ver. 1.9.3.7 Thanks.

1 REPLY 1

Re: Fatal error: Allowed memory size of xx bytes exhausted (tried to allocate xx bytes) in /home/...

Hi @xasha_g

 

The cause is because PHP has exhausted the maximum memory limit as set by the configuration value memory_limit.

 

Typically this PHP configuration value has a very low default of 8MB or 16MB.

 

The Magento documentation recommends at least 64MB, however even this value can fall short on certain script executions.

 

Increasing this value can be done either by asking your host to increase the global memory_limit in the servers php.ini configuration file. Another option is to increase this via .htaccess file.

 

Magento comes with a default .htaccess file in the root directory that includes this

 

configuration directive.

 

php_value memory_limit 64M
php_value max_execution_time 18000

 

You can simply change this value from 64MB to 256M or 512MB depending on your needs.

so it should be like below : 

 

php_value memory_limit 512M
php_value max_execution_time 18000

This value should be kept to the minimum necessary to run your application.

 

Hope it helps

if issue solved,Click Kudos & Accept as Solution