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.
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 512Mphp_value max_execution_time 18000
This value should be kept to the minimum necessary to run your application.
Hope it helps
Hi,
Thanks so much for your help. I tried that - this limit was 256M in the .htaccess file. I changed this to 512M, but am still getting this error. Any ideas?
Thanks again.
Hello @xasha_g,
1 check current limit:
(in my os)php -i | grep limit => memory_limit => 256M => 256M
2 locate php.ini
php --ini =>
Configuration File (php.ini) Path: /etc
Loaded Configuration File: /etc/php.ini
Scan for additional .ini files in: /etc/php.d
Additional .ini files parsed: /etc/php.d/curl.ini
3 change memory_limit in php.ini
vi /etc/php.ini
memory_limit = 512M
4 restart nginx and (php-fpm if being used)
service php-fpm restart
service nginx restart
--
If my answer is useful, please Accept as Solution & give Kudos