InMotion Hosting Support Center

Magento 2 PHP Memory Limit

Category: Magento

pfountain@twc.com
Asked:
2017-09-21 10:44 am EST

Hits: 2,214
When I run a readiness check for a module upgrade on my Magento 2 site, I receive the error "Your current PHP memory limit is 512M. Magento 2 requires it to be set to 756M or more.". I have updated my php.ini file memory limit to 756M and also added the recursive setting in the .htaccess file at the same level.
<IfModule mod_suphp.c>
suPHP_ConfigPath /home/founta26/public_html
</IfModule>

Even after these updates, I am still receiving the 512M memory limit error in Magento 2.

Please advise.

You must login before you can ask a follow up question.

You must login before you can submit an answer.

Is there something that we need to do to fix this error/issue.
agenius
3 Points
2018-06-22 08:46 pm EST

OTHER ANSWERS

0

John-Paul
Staff
31,633 Points
2017-09-21 11:13 am EST
Hello pfountain@twc.com,

Thank you for your question regarding changing your PHP Memory limit in Magento 2. I recommend viewing your PHP settings with a phpinfo page. This will allow you to view the PHP memory that is being assigned, and confirm it is being increased.

Thank you,
John-Paul

You must login before you can post a comment about this answer.

phpinfo shows the increased value
pfountain@twc.com
34 Points
2017-09-21 11:25 am EST
Could my cron jobs be pointing to a different php.ini file per the article here: http://alanstorm.com/your-current-php-memory-limit-is-128m-and-other/
Current cron job settings are as follows:
/opt/php70/bin/php /home/founta26/public_html/bin/magento setup:cron:run >> /home/founta26/public_html/var/log/setup.cron.log

/opt/php70/bin/php /home/founta26/public_html/bin/magento cron:run | grep -v "Ran jobs by schedule" >> /home/founta26/public_html/var/log/magento.cron.log

pfountain@twc.com
34 Points
2017-09-21 11:34 am EST
currently running php 7.0.22
pfountain@twc.com
34 Points
2017-09-21 11:36 am EST
When you run a cron from command line, it uses the servers default PHP settings. You may be able to set your PHP settings from command line, but this will require you to test/troubleshoot further. With Easy Apache 4 all the extensions for PHP have their own .ini file and you cannot include the includes path for them in any ini but the default. So you would need to combine all those little ini files into a single larger php.ini. The .ini files should be located here: /opt/ea-phpXX/root/confd
Just cat * in that directory and echo the output to a single file.

Thank you,
John-Paul
John-Paul
31,633 Points
Staff
2017-09-21 1:19 pm EST
I am having the same issue. What is the resolution?
agenius
3 Points
2018-06-22 8:45 pm EST
You would need to create a single INI file to specify with your command as described in John-Pauls last response.
KyleM
1,173 Points
Staff
2018-06-25 11:41 am EST
Like this Question?

Forum Login

You are NOT logged in. You can still browse our Support Center.

To participate within our Community Support Forum:

Need more Help?

Ask the Community!

Get help with your questions from our community of like-minded hosting users and InMotion Hosting Staff.

Current Customers

Chat: Click to Chat Now E-mail: support@InMotionHosting.com
Call: 888-321-HOST (4678) Ticket: Submit a Support Ticket

Not a Customer?

Get web hosting from a company that is here to help. Sign up today!