Skip to content

Maxclients not hit recently, but you suspect it has? Check the uptime!

Richard Forth edited this page Jan 7, 2021 · 5 revisions

https://github.com/apache/httpd/blob/0b61edca6cdda2737aa1d84a4526c5f9d2e23a8c/server/mpm/prefork/prefork.c#L809

            /* only report this condition once */
            if (!retained->maxclients_reported) {
                ap_log_error(APLOG_MARK, APLOG_ERR, 0, ap_server_conf, APLOGNO(00161)
                            "server reached MaxRequestWorkers setting, consider"
                            " raising the MaxRequestWorkers setting");
                retained->maxclients_reported = 1;
            }

As reported here within the code for the apache webserver itself, Maxclients is only ever reported once per lifetime of apache, so if apache has been up for like 300 days, there is a really strong likelihood that apache already hit maxclients and was rotated out of the logs long ago.

Its worth restarting apache so that if maxclient is hit again, you get that all important log message. If the issue is transient and resolves itself without intervention, such as restarting apache, and then apache has a LOOONG uptime - this is why this non'logging of the condition occurrs within apache2buddy.

In fact this can throw you even if apache [maxclients] was hit a few hours ago but a more recent outage occurred, the maxclients being hit wont be logged "again" if apache wasn't previously restarted.

Its not a bug in apache2buddy, and evident from the link above, its by design in apaches own codebase.

Hope this helps

Rich

*Maxclients also == MaxRequestWorkers