Limit the number of connections for Apache per Virtual Domain?

mydomain

Well-Known Member
Aug 10, 2003
138
0
166
We have several servers, one particular server has an extremently popular site which at this time of year receives huge numbers of hits and this results in a huge number of concurrent connections and appears to be causing Apache to appear down for new connections after the maxclients limit is reached.

Can you recommend what should be done in this case and whether the maxclients for that particular virtual host can be limited to a value so that other sites are not affected.

Ive looked at mod_throttle but that would appear to be really for limiting bandwidth usage per virtual host for example, where Im looking to limit the maxclients/connections per virtual domain.

Any help appreciated.
 

anton_latvia

Well-Known Member
PartnerNOC
May 11, 2004
410
17
168
Latvia
cPanel Access Level
Root Administrator
For apache 1.3 you can use mod_ipdrop. Here is how I install and configure it:

Code:
cd
cd install
mkdir ipdrop
cd ipdrop
wget http://miksir.pp.ru/mod_ipdrop_v001/Makefile
wget http://miksir.pp.ru/mod_ipdrop_v001/mod_ipdrop.c
APXS=/usr/local/apache/bin/apxs make
APXS=/usr/local/apache/bin/apxs make install

vi /etc/httpd/conf/httpd.conf


/etc/init.d/httpd restart

##		 ##
#  CONFIGURATION  #
##		 ##

GlobalMaxConnectionsPerIP 10 10 10 
IPDropDebug 1