- Plesk for Linux
- Websites on the server are experiencing 504 Gateway Time-out nginx errors consistently after working without issues for a period of time
- The Apache web server goes down periodically with the following error message in its Apache error log:
Note: On RHEL-based distributions, the Apache error is located at
/var/log/httpd/error_log, while on Debian-based distributions, it is located at
CONFIG_TEXT: [Fri Nov 17 10:26:21.896808 2023] [mpm_event:error] [pid 27010:tid 140326926068672] AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
CONFIG_TEXT: [Fri Nov 18 10:06:21.125808 2023] [mpm_prefork:error] [pid 23090:tid 120336926067734] AH00484: server reached MaxRequestWorkers setting, consider raising the MaxRequestWorkers setting
- Error similar to the following entries occur in the nginx error log for many domains on the server:
CONFIG_TEXT: [error] 26927#0: *417 connect() failed (110: Connection timed out) while connecting to upstream, client: 203.0.113.2, server: example.com, request: "GET /?amp HTTP/1.1", upstream: "https://203.0.113.2/?amp", host: "example.com"
MaxRequestWorkers limit set for the Apache web server has been reached and there are no free workers to serve new requests to Apache. As a result, requests are being served slowly or not served at all and therefore the websites become inaccessible, even though the server's CPU and RAM resources are not exhausted.
MaxRequestWorkers settings for Apache. The general formula for making the necessary calculation is the following:
# MaxRequestWorkers = (Total RAM - Memory used for Linux, DB, etc.) / average Apache process size
MPM Event: The default ServerLimit value is 16. To increase it, you must also raise
MaxRequestWorkersusing the following formula: ServerLimit value x 25 =
MaxRequestWorkersvalue. For example, if
ServerLimitis set to 20, then
MaxRequestWorkerswill be 20 x 25 = 500.
MPM Prefork: The default
MaxRequestWorkersvalue is 256. To increase it, you must also raise
Note: The below values are examples. They must be adjusted according to the server capabilities and load.
Note: if the issue persists, switch MPM to Prefork in Tools & Settings > Apache Web Server.