cancel
Showing results for 
Search instead for 
Did you mean: 

HP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

HP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

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

 

 

Am getting error like this. I have change  the memory limit to -1. Can anybody figure it out why this error is occurring.

3 REPLIES 3

Re: HP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

Hi @linus392,

 

Maybe the .htaccess is overriding your config value?

Re: HP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

let me know your apache handler

you can post it from phpnfo() function

 

Re: HP Fatal error: Allowed memory size of XXXX bytes exhausted (tried to allocate XXXX bytes)

Hello linus392,

 

You might have encountered this error while running the static content deploy or compilation command. In addition, the memory exhausted error occurs while installing a library using a composer.

 

It is due to the limited memory of your live site or local host. The library you are installing might require more memory limit for a successful installation, which is not available, and therefore the error occurs.

 

The solution for this error is to directly increase the memory limit using the below command,

 

Add memory limit in the command:

 

php -d memory_limit=-1 bin/magento setup:di:compile
php -d memory_limit=-1 bin/magento setup:static-content:deploy

 

Set the memory limit as "-1," which means infinite. The required memory will be occupied by the infinite memory available.

 

Add memory limit while installing library using composer:

  • Firstly, you'll need to find the path of the composer using the below command:
$ which composer
  • Thus, It will return the path of the composer, which is used,
php-d memory_limit=-1 [composer_path] require twilio/sdk

I hope the above solution helps you fix the "Allowed Memory Size of Bytes Exhausted in Magento" error.

 

----------------------------

Regards,

Rex M

VPS Hosting | Magento Hosting