cancel
Showing results for 
Search instead for 
Did you mean: 

PHP memory limit error during upgrade

SOLVED

PHP memory limit error during upgrade

Hello,

 

We are trying to upgrade from Magento CE 2.1.5 to 2.1.9 before launching our website using the Magento Updater.

 

We have continuously been receiving the following error when doing the readiness check:

"Your current PHP memory limit is 2048M. 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."

 

We managed to bypass the readiness check in order to begin the upgrade, but now our upgrade it stuck after displaying:

"Job "update {"components":[{"name":"magento/product-community-edition","version":"2.1.9"}]}" has successfully completed."

 

I checked the update log and it is full of PHP memory limit errors and more are getting created. We modified our .htaccess and php.ini files and set the memory limit to 2048M which should be more than enough. What is odd is that based on the error message, Magento seems to able to recognize that limit change, but it still doesn't recognize that it is enough. I have looked through forums and I haven't been able to find a case where Magento displays the modified memory limit and still doesn't allow it.

 

Any suggestions?

6 REPLIES

Re: PHP memory limit error during upgrade

Hi, i have the same issue, do you found the solution?

Re: PHP memory limit error during upgrade

I Founded the solution!!! 

 

Lets go!

 

Create a .bat to run the cron job with this

C:\xampp\php\php.exe C:\xampp\htdocs\magento\bin\magento cron:run
C:\xampp\php\php.exe C:\xampp\htdocs\magento\update\cron.php
C:\xampp\php\php.exe C:\xampp\htdocs\magento\bin\magento setup:cron:run

 

And configure your php.ini with 756M memory_limit and your .htaccess (in main of your magento) with 756M as well.

 

After that start the apache and mysql and run the job and be happy (Try the verification again)

Re: PHP memory limit error during upgrade

This worked! Thank you!

 

I had been following those steps before posting, but for whatever reason, Magento would only accept if I entered 756M as the memory_limit despite it saying "756M or more"

Re: PHP memory limit error during upgrade

how to do it???

Re: PHP memory limit error during upgrade

how to do it????

Re: PHP memory limit error during upgrade

I got it to work by entering 756M as the memory_limit exactly.  Even though documentation said that it works for 756M or more, having more would cause an error for me.