Akins, Brian wrote:

> Short Term solution:
> 
> This is what we did.  We use worker MPM.  We wrote a simple modules that
> keep track of how many keeapalive connections are active.  When a threshold
> is reached, it does not allow anymore keepalives.  (Basically sets
> r->connection->keepalive = AP_CONN_CLOSE).  This works for us, but the limit
> is per process and only works for threaded MPM's.

Could that be done dynamically?  As in, make the max keepalive time a
function of how near the server is to running out of spare workers?

Oh, and is the default still ridiculously high?  ISTR it being 15 secs
at one time - not sure if that ever got changed.

Also, have you looked into making keepalive dependent on resource type?
E.g. use them for HTML docs - which typically have inline contents - but
not for other media types unless REFERER is a local HTML page?


> Long Term solution:
> 
> Keep track of keepalives in the scoreboard (or somewhere else). Allow
> admin's to set a threshold for keepalives:
> 
> MaxClients 1024
> MaxConcurrentKeepalives 768
> 
> Or something like that.
> 
> 
> Thoughts?  I am willing to write the code if this seems desirable.  Should
> this just be another module or in the http core?

Is that a candidate application for the monitor hook?  Other things
being equal, I'd make it a module.

-- 
Nick Kew

Reply via email to