Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

2 Answers 2

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

 
discard

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.