httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oliver" <>
Subject [users@httpd] Limiting connections per IP
Date Thu, 27 Sep 2007 12:57:35 GMT

I am currently running Apache (prefork) 2.0.55 under Ubuntu 6.06 LTS. Apache
is running on a VPS with a limited amount of RAM so I have been
investigating ways to limit the number of processes being opened per

My MaxClients setting is set to 38 which is just about all the RAM I have
for. However 99% of the time only 8-10 processes are in use. Occasionally
someone will run a site ripper which uses 30+ threads and my MaxClients
setting is then reached. New visitors will then face a delay.

To try and solve this I have tried 2 Apache modules, mod_cband and
mod_limitipconn - both have the ability to limit the number of connections
allowed per IP. However, both seem to need to launch an Apache process
before it can reject the connection with a 503, by which time the MaxClients
limit has already been reached.

Additionally I have investigated limiting the number of simultaneous
connections per IP using iptables. However, due to a bug in Ubuntu's
iptables, this option is not available to me. I cannot patch the kernel
either, as I am using a VPS.

So my question in simple terms is this: is there a way of limiting
simultaneous connections per IP without having to launch additional
processes to handle the rejections?

Any help appreciated, Oliver.

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message