On Wed, 28 Feb 2001, Jason Terry wrote:
> My problem is that recently I have had some users that are getting
> impatient and hitting the reload/refresh button OFTEN.  In some
> instances this causes one single person to have over 40 httpd children
> service JUST them.  This causes my server to start thrashing swap...

First, put something in place so that your server will never go into
swap.  I prefer a combination of MaxClients and Apache::SizeLimit.  Also,
if you haven't moved your images to another server and/or put a proxy
server in place, do that.

> Does anybody on this list know of a way to limit the number of
> connections apache will allow per IP address (before any reverse
> lookups would be nice)?

If you set a unique cookie, you could limit based on that and fall back to
IP address if you don't find a cookie.  That will help with the proxy
issue.  You could adapt one of the existing modules for this purpose, or
maybe grab Randal's Stonehenge::Throttle code from the list archives.

Be careful.  Blocking users is always a dangerous thing to do and may be
more trouble than it's worth.  You could check the list archives for
discussions of how to handle long-running tasks for ideas on interface
changes that might solve your problem.

- Perrin

Reply via email to