Skip to content

Fix "server reached MaxRequestWorkers" Apache error

The error “server reached MaxRequestWorkers” in the Apache service logs does not mean the Apache MaxRequestWorkers setting needs to be changed.

The “server reached MaxRequestWorkers setting” message means one of the apps on the server is receiving requests faster than the requests can be answered based on the speed of the app’s code and the server’s available CPU and memory.

Cause of “server reached MaxRequestWorkers”

The number of PHP requests an app can execute concurrently is determined by the app’s PHP-FPM max_children setting. When this limit is reached and all of an app’s PHP processes are busy executing requests, each additional request that comes in to the server is queued by Apache until the app completes one of the PHP requests that is already executing. When the number of requests queued in Apache becomes too large, Apache logs the message “server reached MaxRequestWorkers setting”.

To identify which app is causing the problem, SSH into the server as root and run the following command to search the PHP-FPM service logs to look for occurrences of apps reaching their PHP-FPM max_children limit.

Terminal window
sudo grep -F "max_children" /var/log/php*-fpm-sp.log

Fix “server reached MaxRequestWorkers”

To fix the “server reached MaxRequestWorkers” error, increase the app’s PHP max_children setting.

Fix “Scoreboard is full, not at MaxRequestWorkers”

Unlike the log message “server reached MaxRequestWorkers setting”, the log message “Scoreboard is full, not at MaxRequestWorkers” indicates a bug in Apache that was fixed in a previous version of Apache. However, there have been a very small number of reports of Apache encountering this same bug after the bug was fixed.

The bug was triggered by the same conditions that triggered the “server reached MaxRequestWorkers” error. Increasing the PHP max_children setting for any apps that were hitting their PHP-FPM max_children limit should resolve the problem.

If you encounter the error “Scoreboard is full, not at MaxRequestWorkers”, restart Apache using the following command.

Terminal window
sudo service apache-sp restart