cancel
Showing results for 
Search instead for 
Did you mean: 

unable to update php memory limit in magento 2.2.1

unable to update php memory limit in magento 2.2.1

Hi All, some help with this would be greatly appreciated

 

I set up site approx. 4 months ago and it had been operating fine until last week when I started getting the following error page when trying to navigating to some pages (refreshing the page would usually make it load OK) -

 

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator at webmaster@lextechparts.com.au to inform them of the time this error occurred, and the actions you performed just before this error.

More information about this error may be available in the server error log.

Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.

 

I checked web server error logs and found error indicating some kind of memory problem -

 

[Tue Apr 24 00:48:06.862216 2018] [:error] [pid 26898] (12)Cannot allocate memory: [client 141.8.143.191:64296] couldn't create child process: /opt/suphp/sbin/suphp for /home/lele2066/public_html/index.php

 

At the same time started getting this error when navigating through the backend -

 

"Something went wrong with processing the default view and we have restored the filter to its original state"

 

Checked the Magento error logs and on the update.log file found -


[2018-04-23 23:43:05] setup-cron.ERROR: 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. [] []

 

Did a php info check and indeed found that the php memory limit was set to 128M.

Changed the memory limit to 756M as suggested on all the php.ini and htaccess files and now the php info is saying that the memory limit is 756M.

 

Hoped this would solve it, However I am still geting the same issues and curiously the same error logs.

 

Any ideas as to why the error log is still saying that the memory limit is at 128M when the server is saying its set at 756M?

 

Cheers Scott

3 REPLIES 3

Re: unable to update php memory limit in magento 2.2.1

Hi @Lextech

 

Looking at the full thread of your issue , seems like on server level memory is set to 756M but on your application it is still 128M.

 

To debug the issue , create one php file in your root directory and write phpinfo() function in it.

 

then run that php file in your browser and check memory of PHP.

 

compare with your server , if it showing same as 756M , then you have some other issue.

if issue solved,Click Kudos & Accept as Solution

Re: unable to update php memory limit in magento 2.2.1

Hi ManthanDave 

 

Thank you for your reply. I really appreciate it.

 

I did run a phpinfo check when the issue first started happening, this is when I noticed it was set to 128M. 

 

I then increased the limit to 756M in the php.ini & htaccess files.

 

The phpinfo now shows the limit to be 756M http://www.lextechparts.com.au/phpinfo.php

 

However still getting the error pages and back end issues and logs saying that it is at 128M????

Any other suggestions?

 

cheers Scott

Re: unable to update php memory limit in magento 2.2.1

Hi @Lextech , 

 

seems like you have server side issue related to permission and memory as well.

 

so better to create ticket/ask your hosting provider for this issue.

 

500 internal server error comes with many reasons , as we have already changed memory still there are few pain points which needs to be taken care , like .htaccess file is there in root directory or not ?

 

proper permissions for directory and files is give or not ?

 

so here i am sharing reference link with you that might help you to debug the issue - https://www.yireo.com/tutorials/magebridge/troubleshooting/1245-solving-500-internal-server-errors

if issue solved,Click Kudos & Accept as Solution