Too Many Processes

When configured using mod_fcgid, Apache runs a number of PHP processes constantly in order to keep them available and ready to process incoming requests.

The default configuration, however, allows for Apache to start many processes to serve incoming traffic. This can mean if your site is crawled by a bot, or anything that requests a lot of pages quickly, the server running the site can quickly end up with hundreds of PHP processes. With a typical PHP process easily exceeding 30MB in size, this can quickly overwhelm more modestly sized servers.

Restricting Per User

The magic configuration directive you need to limit the amount of processes running per user is FcgidMaxProcessesPerClass. Specify it in the Apache configuration as below in the VirtualHost configuration.

<IfModule mod_fcgid.c>
    FcgidMaxProcessesPerClass 8
</IfModule>

Restart Apache and then you’re done.