Magento 2: reporting incorrect memory usage

Modified on Thu, 14 Oct 2021 at 07:40 PM

With Magento 2, there are certain requirements to run the system. Despite configuring over 768 MB of memory, Magento can still complain.

Your current PHP memory limit is 128M. Magento 2 requires it to be set to 756M or more. As a user with root privileges, edit your php.ini file to increase memory_limit. (The command php —ini tells you where it is located.) After that, restart your web server and try again.

For additional assistance, see PHP settings check help .

Solution

Create in /home/username/public_html the file .user.ini and enter the following:

memory_limit = 756M

Run the following commands to update Magento with the correct memory usage:

php  -c /home/username/public_html/.user.ini bin/magento cache:flush
php  -c /home/username/public_html/.user.ini bin/magento cron:run
php  -c /home/username/public_html/.user.ini bin/magento setup:cron:run

Tip: Include -c /home/username/public_html/.user.ini with the cron jobs.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article