Graham Leggett wrote:
Nick Kew wrote:

Apart from limiting the CGI programs, another approach would be to
use mod_load_average to return 503 when the system as a whole is
under heavy load.  Refusing cleanly to run the heavy CGI scripts at all
has got to be better than killing them after they've munched your
resources.

Would this be limited to the scripts themselves, or to the server as a whole?

It can do either the entire server, or for specific handler types:
http://svn.force-elite.com/svn/mod_load_average/trunk/src/mod_load_average.c

This way you could disable CGI when your LA is above 10, and then disable everything when your LA is above 100:

    LoadAvgMaxByHandler cgi-script 10
    LoadAvgMax 100

-Paul

Reply via email to