How To Increase MaxRequestWorkers Connections in Apache through command prompt?

  StradSolutions

Case: If apache service automatically gets stopped then check the apache logs through below command:

/var/log/httpd/error_log

If found that server reached MaxRequestWorkers setting then we can follow the below steps:

Step 1: Login to the server through SSH

Step 2: Go to the below path to increase max connection:

 vim /etc/httpd/conf.modules.d/01-cgi.conf

Step 3: Adjust the MaxRequestWorkers settings for Apache. General formula looks like below: 

MaxRequestWorkers = (Total RAM – Memory used for Linux, DB, etc.) / average Apache process size

MPM Event: The default ServerLimit value is 16. To increase it, you must also raise MaxRequestWorkers using the following formula: ServerLimit value x 25 = MaxRequestWorkers value. For example, if ServerLimit is set to 20, then MaxRequestWorkers will be 20 x 25 = 500.

You can refer to the below Plesk article for more details:

https://support.plesk.com/hc/en-us/articles/12377660243351-Apache-keeps-going-down-on-a-Plesk-server-server-reached-MaxRequestWorkers-setting

Step 4: save the file and restart Apache Service

LEAVE A COMMENT