How to Manage Apache Resources Limits With mod_slotlimit

Valic —  June 15, 2010 — Leave a comment

mod_slotlimit is an Apache module that using dynamic slot allocation algorithm and static rules, can manage resources used for each running site.

Step 1. Preparing Your system

In order to compile mod_slotlimit, you will need to have apxs2 (APache eXtension tool) installed and configured with Apache.

Use the following command to install

apt-get install apache2-prefork-dev build-essential

Step 2. Download the source package from here


Step 3. Open archive, compile and install module with those commands:

tar zxvf mod_slotlimit.tar.gz

cd mod_slotlimit-1.1


make install

Step 4. Load Module

echo “LoadModule slotlimit_module   /usr/lib/apache2/modules/” >> /etc/apache2/httpd.conf

Step 5. Configuring mod_slotlimit

AvailableSlotsPercent – Percentage of apache slots available in order to activate dynamic slot allocation algorithm
MaxConnectionsPerSite – Max connections for each running site
LimitSite – Specific site to limit
LimitSiteConnections – Max connections for “LimitSite”
ClientIpLimit – Number of maximum simultaneous connection per IP
ForceVhostName – Force vhost hostname in scoreboard. Useful when vhost hostname do not match site visited, for example if you’re using mod_vhost_alias

Step 6.  Edit apache2 configuration file

mcedit /etc/apache2/apache2.conf

Add the following:

<IfModule mod_slotlimit.c>
AvailableSlotsPercent 15
MaxConnectionsPerSite 30
LimitSiteConnections 15
ClientIpLimit 15
ForceVhostName On

/etc/init.d/apache2 restart



Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

No Comments

Be the first to start the conversation.

Leave a Reply