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.

link|improve this question
feedback

2 Answers

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.

link|improve this answer
feedback

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

link|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
feedback

Your Answer

 
or
required, but never shown

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