Apache randomly stopping. (macOS Monterey) (plenty of resources available)

All MAMP discussions around troubleshooting and anything related to MAMP. Be as detailed as possible here when posting an issue.
Post Reply
mampsupportmod
Site Admin
Posts: 135
Joined: Wed Jan 20, 2021 3:06 am

Apache randomly stopping. (macOS Monterey) (plenty of resources available)

Post by mampsupportmod »

Update:

This could be an issue between macOS version. Using the same Apache build in macOS 10.15.7 Catalina and macOS 12.1 Monterey. Still getting the Apache hung processes and randomly not working in macOS 12.1. Both versions of MAMP Pro are different but using same Apache/PHP configurations and configuration file settings. Also have increased the max files and max processes to match on both systems. macOS Catalina seems more resilient for whatever reason.


Server Version: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
Server MPM: prefork




I'm starting a trace now, but Apache seems to just stop working at random times. I noticed the following in Apache debug

Apache: v2.4.46
PHP: v7.4.27

Code: Select all

[Wed Jan 05 09:55:10.886811 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:14.998415 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:19.147199 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:23.248814 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:27.309626 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:31.333877 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:35.444023 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:39.564339 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:43.697707 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:47.746903 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:51.755977 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:55.880988 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:55:59.889086 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:04.009405 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:08.150560 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:12.181418 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:16.221319 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:20.238353 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80
[Wed Jan 05 09:56:24.309226 2022] [core:debug] [pid 41941] mpm_unix.c(683): (70007)The timeout specified has expired: AH00056: connect to listener on [::]:80

Code: Select all

[Wed Jan 05 10:00:14.523014 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 20 total children
[Wed Jan 05 10:00:33.537041 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 30 total children
[Wed Jan 05 10:01:29.945185 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 25 total children
[Wed Jan 05 10:02:28.687036 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 24 total children
[Wed Jan 05 10:02:29.761587 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 3 idle, and 32 total children
[Wed Jan 05 10:03:05.317812 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 28 total children
[Wed Jan 05 10:03:06.419719 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 0 idle, and 36 total children
[Wed Jan 05 10:06:31.239610 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 21 total children
[Wed Jan 05 10:08:42.264718 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 22 total children
[Wed Jan 05 10:09:01.322409 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 31 total children
[Wed Jan 05 10:09:38.366957 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 26 total children
[Wed Jan 05 10:12:10.699614 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 25 total children
[Wed Jan 05 10:13:16.224838 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 24 total children
[Wed Jan 05 10:13:17.299850 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 0 idle, and 32 total children
[Wed Jan 05 10:13:18.329706 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 32 children, there are 0 idle, and 48 total children
[Wed Jan 05 10:15:00.207478 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 0 idle, and 29 total children
[Wed Jan 05 10:15:01.293524 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 16 children, there are 2 idle, and 37 total children
[Wed Jan 05 10:17:02.975552 2022] [mpm_prefork:info] [pid 63353] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 3 idle, and 34 total children

Check to see if some junk php program installed on your site (likely depreciated) making tons of calls to your site at once (display all other errors and warnings in PHP MAMP then look in php_error.log and correlate the times with your Apache access log) . This is likely the cause for creating the timeout. Fix or remove that php app. Test it out by moving the site to another host if using vhosts or hosting multiple sites. In this case, it isn't he issue it seems though.


More on this:

Hardware is the same (see versions below). Apache on my stable system has never had an issue last 5 years. On the new system, Apache randomly stops within 24 hours. There is no error log (even if I enable debug error log) and i have to restart Apache to get it to work. Both systems also have max files and processes hardcoded to upper limits and are identical.

What can I do for Apache to tell me exactly why it stops serving requests? I cannot find anything interesting in my mac system log the same time.

My systems have the exact same version of PHP, Apache, and configuration files accordingly.


Problematic System:
macOS 12.1 Monterey
Server Version: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
Server MPM: prefork


No Issue System:
macOS 10.15.7 Catalina
Server Version: Apache/2.4.46 (Unix) OpenSSL/1.0.2u PHP/7.4.12 mod_wsgi/3.5 Python/2.7.13 mod_fastcgi/mod_fastcgi-SNAP-0910052141 mod_perl/2.0.11 Perl/v5.30.1
Server MPM: prefork
MAMP Support Forums is an unofficial support forum covering MAMP & MAMP Pro solution stacks.
Post Reply