1. alex-james
  2. MAMP - Troubleshooting
  3. Tuesday, 10 November 2020

Since upgrading from MAMP 5.5 to 6.0.1 I am having intermittent "Internal Server Error" responses with a 500 return code.

These seem to be when the server has a lot of work to do so after clearing the cache for example or clearing the compiled content, when I refresh the same page then it completes without error. I have checked the apache, PHP and MySQL logs and there are no errors corresponding with the times the issues occur.

I have my php.ini set to use "unlimited" memory (memory_limit = -1) so that is not the limitation, but it feels like I am hitting some other limitation which is causing an issue without throwing an error, has anybody else come across this or know of a way to increase the logging in MAMP so I can debug this issue, because at the moment I am stumped.

For reference I am running on Mac Catalina 10.15.7 and the site I am running is a Magento 2.3 build running on PHP 7.2.33 with Apache.



Accepted Answer Pending Moderation
0
Votes
Undo

Loom video showing the issue, 500 on first attempt, page loads successfully on second attempt, the same can pretty much be repeated on all pages across the site after a cache clean.

https://www.loom.com/share/365c22b5c2af40978700106980476484

Accepted Answer Pending Moderation
0
Votes
Undo

I'm having similar issues using Wordpress hosts. (PHP 7.3.6 & 7.4.9 / Apache / Catalina 15.7)

Intermittent 500 errors on some pages with no clear cause, and a lot of Wordpress functions failing due to curl timeouts.

I've tried increasing memory limits and timeout times for PHP and fastcgi, doesn't seem to solve the issue.

This has definitely only been a problem since upgrading to 6.01.

Accepted Answer Pending Moderation
0
Votes
Undo

When I was using PHP 7.4.9 CGI mode, I too got random 500 errors. However, I was only using this mode briefly. I switched back to module mode and it's been fine without 500 errors for over a month. My config is below

 

memory_limit = 512M
max_input_time = 300
max_execution_time = 300

Accepted Answer Pending Moderation
0
Votes
Undo

Hmm thanks. I've solved it for now by downgrading to 5.7 as it was holding up a project.

Will wait a few point releases & then try again.

Accepted Answer Pending Moderation
1
Votes
Undo

@mampsupportmod I am using similar config only I have -1 for my php memory_limit which effectively disables the limit, I can't really switch to the module mode as I need to run PHP 7.1, 7.2 and 7.4 for the different sites I support.

This issue has been driving me mad all week, I've raised a ticket with MAMP support and they have advised disabling the following extensions in the php.ini files as they said there is a known issue with these:

extension=pgsql.so

extension=pdo_pgsql.so

Interestingly I disabled these in the templates through the MAMP GUI but after a restart they were still showing as active, so I had to disable them in the /Applications/MAMP/bin/php/php7.x.x/conf/php.ini files and then restart. This however had no effect on my issue, so far MAMP support have not been able to come back with anything further to try.

Today I restarted my Mac for the first time in a week and, whilst the issue is not resolved, it does seem a bit better, provided I do not try to open two tabs to the same website at the same time I don't see the error, so that is progress.

Accepted Answer Pending Moderation
0
Votes
Undo

Final update on this one, so I have spent a lot of hours this weekend flipping my sites from apache to nginx with the help of this article:

https://stackoverflow.com/questions/44667452/how-to-setup-magento2-with-mamp-pro-and-nginx

 

and adding these entries to the nginx template under http {

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
 
So far I have not seen a single instance of the 500 Internal Server Error which indicates it is a limitation in apache which is causing the issue in MAMP
Accepted Answer Pending Moderation
0
Votes
Undo

Final update on this one, so I have spent a lot of hours this weekend flipping my sites from apache to nginx with the help of this article:

https://stackoverflow.com/questions/44667452/how-to-setup-magento2-with-mamp-pro-and-nginx

 

and adding these entries to the nginx template under http {

fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
 
So far I have not seen a single instance of the 500 Internal Server Error which indicates it is a limitation in apache which is causing the issue in MAMP
 

Ah, so were you using NGINX or Apache for the hosts having issues?
Accepted Answer Pending Moderation
0
Votes
Undo

Apache = 500 Internal Server error - roughly seeing 100-200 times per day

Nginx (2 days in of testing) = No errors

Accepted Answer Pending Moderation
0
Votes
Undo

I had the same issue with CGI mode on Apache. I found that the update had removed my previous timeout settings and I had to re-enter them according to this answer: https://stackoverflow.com/a/24976009/2377238 , particularly commenting out

 
MAMP_FastCgiServer_MAMP

 

and adding

 
FastCgiServer /Applications/MAMP/fcgi-bin/php7.4.9.fcgi -idle-timeout 3600

 

(for all versions you use). Then you need to restart the server.

  • Page :
  • 1


There are no replies made for this post yet.
Be one of the first to reply to this post!