cancel
Showing results for 
Search instead for 
Did you mean: 

Istallation increasing in size very rapidly and memory errors in log (Magento 2.42)

Istallation increasing in size very rapidly and memory errors in log (Magento 2.42)

My installation of 2.42 was running with no errors.  After an extension was modified the error log is rapidly filling up with thousands of memory errors, here's one example.

 

[28-Apr-2021 09:32:57 UTC] PHP Fatal error: Out of memory (allocated 1801797632) (tried to allocate 20480 bytes) in /home/host/mywebsite.com/vendor/magento/framework/Serialize/Serializer/Json.php on line 37

 

The developer has told me these are due to misconfigured cron jobs but I haven't changed any configerations.

If I disable all the cronjobs in cpanel the size of the installation irapidly increases (at least 4GB or 50% bigger in an hour or so)

Does anyone have any ideas at all about this please?

1 REPLY 1

Re: Istallation increasing in size very rapidly and memory errors in log (Magento 2.42)

Hi @Marchick,

 

Please try the following command:

php bin/magento setup:upgrade
php bin/magento setup:static-content:deploy
php bin/magento setup:di:compile
php bin/magento cache:flush
php bin/magento cache:clean

//To run command forcefully

php -f bin/magento

 

//To run command with memory limit 4G

php -d memory_limit=4G bin/magento

 

//To run command with max memory limit

php -d memory_limit=-1 bin/magento

 

If you're still facing the same issue then try the following settings:

1.[Magento2-root-folder]/index.php

ini_set('memory_limit',256);

 

OR 

 

ini_set('memory_limit','-1');

 

Check current memory_limit value using CLI:

1. php -r "echo ini_get('memory_limit').PHP_EOL;"

2. php -i | grep memory

 

If the issue are still persist then increase the memory limit (e.g., up to 2048M) in the following places:

1. [Magento2-root-folder]/.user.ini memory_limit = 768M

2. [Magento2-root-folder]/.htaccess (2 places) php_value memory_limit 768M

3. [Magento2-root-folder]/pub/.user.ini memory_limit = 768M

4. [Magento2-root-folder]/pub/.htaccess (2 places) php_value memory_limit 768M

 

Issue should be resolved by now, if it is still there then disable your custom module and check again.

 

Hope this can help you! Let me know if you need further assistance.

_________

If issue solved, Click Kudos & Accept as Solution.

LitExtension - #1 Shopping Cart Migration Expert

LitExtension helps store owners and agencies migrate all important data from one eCommerce platform to another accurately, securely and at the highest speed.

Visit website: http://litextension.com/