0

sometimes I get issue:

Fatal error: Allowed memory size of 792723456 bytes exhausted (tried to allocate 20480 bytes) in /home/mall/domains//vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 291

792723456 bytes roughly translate to 792 MB

I try increase memory limit. I set in php.ini 2048M but still local value display: 756M and Master Value only correct 2048M and still I get above issue. Any solution?

enter image description here

  • Looks like you've edited the wrong php.ini file. The webserver, for example apache2, uses a different one. Use phpinfo() to determine the real path. – Markus Zeller Jun 13 '22 at 12:58
  • did you restarted apache server after doing this. Also its depends upon your code-implementations as well, so may or may not this above solution you are trying will work – Alive to die - Anant Jun 13 '22 at 12:58
  • It mentions local value, so there may be another place where it is set. You can try `grep -R memory_limit *` from the root of your project to see if it's being set anywhere in that directory. Also check your .htaccess – aynber Jun 13 '22 at 12:59
  • Looks like there may be something somewhere overriding the value you set in the php.ini. Are you doing an override in PHPcode or is there a setting in the Virtual Host definition? – RiggsFolly Jun 13 '22 at 13:03
  • Thanks for all comments. im using litespeed web server. I first found php path via command /usr/local/bin/php --ini | grep 'Loaded Configuration File' and get result: Loaded Configuration File: /usr/local/php74/lib/php.ini next I changed in this file memory_limit and after this restart web server and this changes is visible, correct for master value, but I dont know what is local memory_limit and how to change it because here display only 756M memory_limit in phpinfo – Jan Kowalski Jun 13 '22 at 13:09
  • The MASTER value is from `php.ini` if the LOCAL value is different, then it has been changed as mentioned above – RiggsFolly Jun 13 '22 at 13:10
  • @RiggsFolly thanks friend. This is your shot. I found a value in .htaccess that overwritten my change! Once again thanks! – Jan Kowalski Jun 13 '22 at 13:13

0 Answers0