Skip to content

Magento 2 is giving me Fatal error: Allowed memory size of 1073741824 bytes exhausted when i am trying to save product

I am getting following errros

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 73400328 bytes) in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 228

Fatal error: Uncaught PDOException: SQLSTATE[HY000]: General error: 2014 Cannot execute queries while other unbuffered queries are active. Consider using PDOStatement::fetchAll(). Alternatively, if your code is only ever going to run against mysql, you may enable query buffering by setting the PDO::MYSQL_ATTR_USE_BUFFERED_QUERY attribute. in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228 Stack trace: #0 public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php(228): PDOStatement->execute(Array) #1 public_html/vendor/magento/framework/DB/Statement/Pdo/Mysql.php(93): Zend_Db_Statement_Pdo->_execute(Array) #2 /var/www/modernlamps.dk/public_html/vendor/magento/zendframework1/library/Zend/Db/Statement.php(303): MagentoFrameworkDBStatementPdoMysql->_execute(Array) #3 public_html/vendor/magento/zendframework1/library/Zend/Db/Adapter/Abstract.php(480): Zend_Db_Statement->execute in public_html/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php on line 235

Guys, can you help me to fix this issue?

I have tried to allocate 2GB ram but still having the same error.

  • Magento Version: 2.3.1
  • Php 7.2
  • Nginx