Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I limit the number of concurrent CGI invocations in Apache 2.2.x?

More specifically, my problem is this: I have Apache hosting a Bugzilla instance and other stuff on one server. There's very little legitimate concurrent use of Bugzilla. However, it's trivial to mount a Denial of Service attack on the whole server by ignoring robots.txt and simply fetching a lot of bug pages that fork a process and hit a database.

share|improve this question

Well the answer greatly depends on your CGI process manager. With PHP-FPM via FastCGI, you'd modify pm.max_children. With FCGID you'd define either FcgidMaxProcesses and/or FcgidMaxProcessesPerClass. With FastCGI you'd most likely tweak maxClassProcesses or maxProcesses.

The documentation for whichever process manager you're using will have the exact syntax on details.

share|improve this answer

you could use something like mod_cband to perform the throttling at a bandwidth rather than a process level.

share|improve this answer
Bandwidth is not the issue. Causing computation in MySQL is the issue. – hsivonen Jan 31 '11 at 10:05
mod_cband lets you set a max requests-per-second, which should help. – glob Feb 1 '11 at 5:27

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.