NAME

Apache::LoadAvgLimit - limiting client request by system CPU load-averages

SYNOPSIS

in httpd.conf, simply

<Location /perl>
  PerlInitHandler Apache::LoadAvgLimit
  PerlSetVar LoadAvgLimit 2.50
</Location>

or fully

<Location /perl>
  PerlInitHandler Apache::LoadAvgLimit
  PerlSetVar LoadAvgLimit_1 4.00
  PerlSetVar LoadAvgLimit_5 3.00
  PerlSetVar LoadAvgLimit_15 2.50
</Location>

DESCRIPTION

If system load-average is over the value of LoadAvgLimit*, Apache::LoadAvgLimit will try to reduce the machine load by returning HTTP status 503 (Service Temporarily Unavailable) to client browser.

Especially, it may be useful in <Location> directory that has heavy CGI, Apache::Registry script or contents-handler program.

PARAMETERS

LoadAvgLimit

When at least one of three load-averages (1, 5, 15 min) is over this value, returning status 503.

LoadAvgLimit_1, LoadAvgLimit_5, LoadAvgLimit_15

Each minute's load-averages (1, 5, 15 min) is over this value, returning status 503.

AUTHOR

Okamoto RYO <ryo@aquahill.net>

SEE ALSO

mod_perl(3), Apache(3), getloadavg(3), uptime(1)