-2

I'm running MAMP Pro 4.4 on OSX High Sierra and after a while I started getting 500 errors while working on a Laravel 5.2 application. I opened activity monitor and noticed there were 40 httpd processes running, the majority of which had 18 threads. I tried killing them through the command line, stopping and starting MAMP, but they all return when MAMP starts up again. The best closest thing I could find when researching the issue is:

Stop a number of httpd processes starting on MacBook Pro running Mac OS X Lion?.

Has anyone else run into this before? (I'm not sure if it's related to the httpd processes as other local sites I use MAMP will load fine but it seems to be the only thing I can tell that might be causing the issue.)

1 Answers1

0

Apache Multi-Processing Module (MPM) implements a hybrid multi-process multi-threaded server. By using threads to serve requests, it is able to serve a large number of requests with fewer system resources than a process-based server.

A single control process (the parent) is responsible for launching child processes. Each child process creates a fixed number of server threads and listener thread which listens for connections and passes them to a server thread for processing when they arrive.

Apache HTTP Server always tries to maintain a pool of spare or idle server threads, which stand ready to serve incoming requests. In this way, clients do not need to wait for a new threads or processes to be created before their requests can be served.

The problem is most likely in the pages you are trying to serve and not in http server. Check your error log to see the cause of the problem. You should be able to find error logs from /Applications/MAMP/logs/apache_error_log

Antti A
  • 410
  • 4
  • 12
  • Thanks Antii. I understand how how Apache works. What I don't understand is why I can't terminate the processes. They keep getting relaunched, even when I shut down mamp. – Joseph Niu May 13 '18 at 08:38