Limiting IP connections


Success has come to my web site - but the warm glow of thousands of visitors everyday is now being tempered with the inability to handle the number of visitors properly.

Dreamhost have set limits on how much server resources we use - but have suggested alternatives for us:

"Your bandwidth is not being restricted at all. What is being restricted is the number of connections your site is making to the Apache server at one time. The problem arises when one site makes too many connections. It locks out other sites and degrades overall server performance.

Basically, your bandwidth is not being throttled, but you are receiving way too many connections at one time for a shared Apache server. This usually happens when someone is using a download manager to download a file and it is connecting many times over to improve download speeds. If you can implement a system that limits connections per IP to your site, we can remove the restrictions."

We’re currently being limited to about 65,000 requests per hour (about 22,000 pages).

Does anyone have any similar experiences or suggestions. Has anyone implented an IP connection limit on their site? Can it be done through the panel?

Lots of questions and you’ll probably suggest i get a dedicated server - but any help would be gratefully received.


There is an Apache module available that allows you to limit the number of connections per IP: mod_limitipconn.c

You would have to ask DreamHost if they would consider installing it (it isn’t something you can do yourself). A different approach would be something like mod_throttle.

Simon Jessey | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


I’m having a similar problem. What I want to do is basically turn off the ability of visitors to use download managers, or at least limit the amount of connections per IP. Does anyone know a simple way of doing this? I would figure you could do so in .htaccess, but I can’t find any information on it.