Why are there tons of PHP processes open on my server?

Posted by fiftyeight on Server Fault See other posts from Server Fault or by fiftyeight
Published on 2011-11-27T17:17:28Z Indexed on 2011/11/27 17:55 UTC
Read the original article Hit count: 322

Filed under:
|
|

Today I saw that a website of mine isn't working so I ssh'd to the server and executed ps -eF. I see about 200 PHP processes that are running all for 4 hours.

Apache is built with mpm event and mod fcgid.

I killed all the PHP processes and now it's running fine, why does this happen? is this expected behavior?

I don't really understand how processes how Apache keeps track of the number of PHP processes and their process IDs, so it would be nice if someone can also give some reference when I can read about this.

Also, I used the "ab" command (Apache Benchmark) to see if this happens all the time, so I ran it about 4-5 times with 30 concurrent requests and again there are like 150 PHP processes running, when I keep running "ab" now it doesn't spawn more processes and the website is still working.

Please shed some light on this! Thank you :)

© Server Fault or respective owner

Related posts about apache2

Related posts about php5