I have an Ubuntu 14.04.4 LTS
server running Apache/2.4.7
and my error.log
file is frequently getting this kind of message below:
[Thu Sep 01 19:45:40.571637 2016] [mpm_prefork:info] [pid 1696] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 3 idle, and 17 total children
[Thu Sep 01 19:47:03.699939 2016] [mpm_prefork:info] [pid 1696] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 4 idle, and 17 total children
[Thu Sep 01 19:48:35.856132 2016] [mpm_prefork:info] [pid 1696] AH00162: server seems busy, (you may need to increase StartServers, or Min/MaxSpareServers), spawning 8 children, there are 2 idle, and 20 total children
I've already changed my apache2.conf
and it looks like the following:
# prefork MPM
# StartServers: number of server processes to start
# MinSpareServers: minimum number of server processes which are kept spare
# MaxSpareServers: maximum number of server processes which are kept spare
# MaxRequestWorkers: maximum number of server processes allowed to start (was: MaxClients)
# MaxConnectionsPerChild: maximum number of requests a server process serves (was: MaxRequestsPerChild)
<IfModule mpm_prefork_module>
StartServers 100
MinSpareServers 30
MaxSpareServers 60
ServerLimit 400
MaxRequestWorkers 400
MaxConnectionsPerChild 10000
</IfModule>
After restarting apache2, errors still remains the same.
My server isn't running out of memory neither CPU usage (htop
output looks pretty fine).
Also, I got those results when executing netstat
and ps
:
ubuntu@php-app1:~$ sudo netstat -pant | grep -c ESTABLISHED
18
ubuntu@php-app1:~$ ps -ef | grep -ic apache2
17
Any help, please? Thanks a lot for your patience and support.