DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=29122>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=29122

mog_cgi should be able to check certain conditions before forking

[EMAIL PROTECTED] changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |PatchAvailable



------- Additional Comments From [EMAIL PROTECTED]  2004-05-27 09:10 -------
I have created mod_load_average to solve this problem:
http://force-elite.com/~chip/archives/mod_load_average-0.1.0-test.tar.bz2
(includes easy configure/make/make install...)

The Main C File:
http://svn.force-elite.com/mod_load_average/trunk/src/mod_load_average.c

It uses the semi-portable(*BSD, Linux, Solaris.. others?) getloadavg(...)
function to determine if the request should be serviced.  The module has two
operating Modes.

First, it has an absolute max load average, if this is reached, all requests
will be rejected with a 503.

The 2nd mode uses the handler type to determine the maximum load under which
they will be served.  This enables you for example to disable PHP or CGI under
high loads, but still serve images and plain html.

Tested on Linux 2.6.6 and FreeBSD-5.2.1 w/ HTTPd 2.1.0-HEAD.

If the ASF is interested, I am willing to donate the module.

Thanks to Nick Kew on IRC for feedback on the implementation.

-Paul Querna

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to