Sites are very slow. Apache shows: server reached MaxClients setting

Refers to:

  • Plesk for Linux

Created:

2016-11-16 13:03:25 UTC

Modified:

2017-02-23 17:42:20 UTC

3

Was this article helpful?


Have more questions?

Submit a request

Sites are very slow. Apache shows: server reached MaxClients setting

Symptoms

Loading the website takes too much time. The following error appears in the /var/log/httpd/error_log :

 [error] server reached MaxClients setting, consider raising the MaxClients setting
[warn] mod_fcgid: process 2968 graceful kill fail, sending SIGKILL

Cause

The connections limit defined by MaxClients is reached.

Resolution

  1. By default, Apache in Plesk is not configured for high-loaded sites. It is recommended to tune Apache performance as it described here: http://httpd.apache.org/docs/2.2/misc/perf-tuning.html .
  2. To resolve the issue with the MaxClients limit, adjust the /etc/httpd/conf/httpd.conf file, increasing the MaxClients value (e.g., to 100):
    <IfModule prefork.c>
    StartServers 1
    MaxClients 100
    MinSpareThreads 1
    MaxSpareThreads 4
    ThreadsPerChild 25
    MaxRequestsPerChild 0
    </IfModule>

Note: if the error persists, consider increasing the MaxClients limit again until the issue is fixed.

If you still see the same message in the Apache log, please check all files where MaxClients directive defined. It can be done with the following command:

# find /etc -type f -exec grep -l 'MaxClients' {} \;
Have more questions? Submit a request

2 Comments

  • 0
    Avatar
    jan janetka

    The last command doesn't work for me, the double \\ at the end breaks it.

    Works fine with just: # find /etc -type f -exec grep -l 'MaxClients' {} \;

  • 0
    Avatar
    Vitaly Zhidkov

    @Jan, thank you for your notice, article has been just updated :)

Please sign in to leave a comment.