You would have received an error by saying
“server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting”
At this time, note clearly - The Apache may get slow in the Plesk server.
CentOS: RHEL-based distributions:
Debian: Ubunty-based distributions:
This error is due to the limitation fixed by the admin where the maximum number of workers alone is allowed. If the limit gets crossed then you will get the error, as well as the Apache, gets slow.
By adjusting the settings of MaxRequestWorkers, we can sort out this problem.
Execute the below mentioned command:
# MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) / process size
Event of MPM: 16 is the default limit of the server. Based on the requirement, it is easy to adjust the number. Using the below-mentioned formulae, we can increase the MaxRequestWorkers limitation:
Prefork MPM: 256 is the default value of MaxRequestWorkers.
Distribution of RHEL/CentOS:
Step 1: Using the command, find the MPM:
Step 2: Using the mentioned path, open the file /etc/httpd/conf.modules.d/01-cgi.conf and start modifying the values.
Prefork of MPM:
Event of MPM:
Once done, kindly restart the Apache with the command:
Distribution of Ubuntu/Debian users:
Step 1: Start finding the MPM using the below-mentioned command:
Step 2: Prefork of MPM:
Open the file by using the path /etc/apache2/mods-enabled/mpm_prefork.conf and start increasing the values.
Event of MPM:
Open the file /etc/apache2/mods-enabled/mpm_event.conf and increase the value.
Step 3: To apply all the changes kindly restart the Apache:
That's it! It is easy to update the changes in Apache and increase the count of MaxRequestWorker.
“server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting”
At this time, note clearly - The Apache may get slow in the Plesk server.
CentOS: RHEL-based distributions:
Code:
/var/log/httpd/error_log
Code:
/var/log/apache2/error.log
By adjusting the settings of MaxRequestWorkers, we can sort out this problem.
Execute the below mentioned command:
# MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) / process size
Event of MPM: 16 is the default limit of the server. Based on the requirement, it is easy to adjust the number. Using the below-mentioned formulae, we can increase the MaxRequestWorkers limitation:
Code:
Value of ServerLimit x 25 = value of MaxRequestWorkers
The value of ServerLimit is 40 then calculate accordingly:
40 x 25 = 2080
Distribution of RHEL/CentOS:
Step 1: Using the command, find the MPM:
Code:
# httpd -V | grep MPM
Prefork of MPM:
Code:
LoadModule cgi_module modules/mod_cgi.so
MaxRequestWorkers 600
ServerLimit 600
Code:
LoadModule cgid_module modules/mod_cgid.so
MaxRequestWorkers 600
ServerLimit 16
Code:
# service httpd restart
Step 1: Start finding the MPM using the below-mentioned command:
Code:
# apache2ctl -V | grep MPM
Open the file by using the path /etc/apache2/mods-enabled/mpm_prefork.conf and start increasing the values.
Code:
MaxRequestWorkers 500
ServerLimit 500
Open the file /etc/apache2/mods-enabled/mpm_event.conf and increase the value.
Code:
MaxRequestWorkers 600
ServerLimit 16
Code:
# service apache2 restart