Server Reached MaxRequestWorkers Setting
New 8 GB Dedicated Server stopped working during peak time and in Apache error.log, I found following errors:
[mpm_prefork:error] [pid 7565] AH00161: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
[mpm_prefork:notice] [pid 7565] AH00169: caught SIGTERM, shutting down
The website is running on PHP 7.1.2, Apache/2.4.10 (Debian), FPM/FastCGI installed according to this tutorial
After some research, I modified /etc/apache2/mods-available/mpm_prefork.conf
, but still, the server goes down during peak time and keep having the same errors.
The last update of mpm_prefork.conf
is:
<IfModule mpm_prefork_module>
StartServers 20
MinSpareServers 5
MaxSpareServers 10
MaxRequestWorkers 1024
ServerLimit 1024
MaxConnectionsPerChild 0
</IfModule>
The issue makes me worried is that no matter what values are in mpm_prefork.conf
, about 6GB of Ram is always free. I assume that some files overwrite /etc/apache2/mods-available/mpm_prefork.conf
and the server ignores this file or if not, then I definitely wrote inappropriate settings.
Could you please give some ideas on how to configure the mpm_prefork.conf
file or what files could overwrite this?
I was having this problem and turns out that I had slow queries and the php took seconds to finish, accumulating processes. So, check your slow logs before changing apache configs.