Symptoms
-
Apache constantly goes down with the error below:
server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
-
At the same time the MaxRequestWorkers value was increased but this does not solve the problem.
-
There is high number of CLOSE_WAIT Apache connections on the server as on the following example:
# netstat -tanp | grep httpd | awk '{print $6}' | sort | uniq -c | sort -n
..................
1700 CLOSE_WAIT -
In an attempt to strace any of the
CLOSE_WAITconnection processes only one domain,example.comis shown. -
Websites can be inaccessible with the error below in domain log file:
(70007)The timeout specified has expired
Cause
Issue with a website code causing high CLOSE_WAIT connections.
Resolution
- Log into Plesk.
-
Suspend the domain
example.com. - Restart Apache and PHP handler that is used for
example.comdomain via Tools & Settings > Services Management.
Then and before enabling the domain again it is required to review the website code with its Developer or in case example.com is a WordPress instance, try to disable the plugins one by one until the culprit of this behavior is found.