Symptoms
-
Websites periodically are not available with one of the errors below:
502 Bad gateway
504 Gateway Time-out (nginx)
-
The following error can be found in Apache Web Server log files (
/var/log/apache2/error.log
on Debian and Ubuntu,/var/log/httpd/error.log
on RHEL, CentOS and CloudLinux):[mpm_event:error] [pid 22565:tid 140163371042688] AH00485: scoreboard is full, not at MaxRequestWorkers.Increase ServerLimit.
-
MPM mode is set to Event in Tools & Settings > Apache Web Server.
Cause
Apache bug with ID #53555.
Resolution
As a workaround, the following steps can be performed:
Switch to MPM Prefork
-
Open Tools & Settings > Apache Web Server.
-
Change MPM mode to Prefork or Worker, if it is available.
Configure logrotate to restart Apache instead of reloading
Note: This workaround might not resolve the issue
-
Connect to the server via SSH.
-
Open logrotate configuration for Apache Web Server using a text editor:
for CentOS/RHEL-based distributions:
/etc/logrotate.d/httpd
for Debian/Ubuntu-based distributions:
/etc/logrotate.d/apache2
-
Change “reload” action to “restart”:
FROM
/bin/systemctl reload httpd.service > /dev/null 2>/dev/null || true
TO
/bin/systemctl restart httpd.service > /dev/null 2>/dev/null || true