Showing posts with label Server reached MaxRequestWorkers setting. Show all posts
Showing posts with label Server reached MaxRequestWorkers setting. Show all posts

Friday, May 6, 2016

Server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting

There are three modules related to this settings. 
prefork, worker and event

First find which module is activated using

a2query -M

Now change its conf file in mods-available. 

In following case, prefork is enabled, so make changes in mpm_prefork.conf

Open file mpm_prefork.conf and increase the MaxRequestWorkers settings according to your RAM.

MaxRequestWorkers
A simple calculation for MaxRequestWorkers would be: 

(Total Memory – Critical Services Memory) / Size Per Apache process

In this case the server has 3400Mb of memory allocated, 

250Mb used by mySQL and each Apache thread averages about 30Mb. 
MaxRequestWorkers = (3400– 250) / 30
therefore MaxRequestWorkers = 105

Restart Apache. Check here too.