How to limit the number of concurrent CGI script invocations in Apache 2.2?

Posted on

How to limit the number of concurrent CGI script invocations in Apache 2.2? – Managing your servers can streamline the performance of your team by allowing them to complete complex tasks faster. Plus, it can enable them to detect problems early on before they get out of hand and compromise your business. As a result, the risk of experiencing operational setbacks is drastically lower.

But the only way to make the most of your server management is to perform it correctly. And to help you do so, this article will share nine tips on improving your server management and fix some problem about apache-2.2, cgi, bugzilla, , .

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.

Solution :

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.

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

Leave a Reply

Your email address will not be published.