Apache 2.4 – increase server limit

By default Apache only allows upto 150 connections, if the number is over, you will be in the queue. It will look like the server is down.

The limit for server is usually configured in the following files:

/etc/apache2/apache2.conf
/etc/apache2/mods-available/mpm_worker.conf
/etc/apache2/mods-available/mpm_prefork.conf

This is the content to update:

 

<IfModule mpm_worker_module>
    ServerLimit              600
    StartServers              10
    MinSpareThreads           75
    MaxSpareThreads          250 
    ThreadLimit               64
    ThreadsPerChild           32
    MaxRequestWorkers       600
    MaxConnectionsPerChild 800
</IfModule>

 

Leave a Reply

Your email address will not be published. Required fields are marked *