Nginx
Nginx errors such as 502 Bad Gateway, 504 timeouts and configuration test failures.
- Nginx 504 Gateway Timeout: causes and how to fix itNginx shows 504 Gateway Timeout when the backend it forwards requests to (PHP-FPM, Node, gunicorn and so on) does not send a response within the configured timeout, 60 seconds by default. Read the error log, test the backend directly, then fix the slow application or raise the timeout for the slow location only.
- Nginx 502 Bad Gateway: causes and how to fix itA 502 from Nginx means Nginx itself is working but the application it forwards requests to (Node, PHP-FPM, Gunicorn, a container) did not give it a valid response. The Nginx error log names the exact reason; most often the backend is not running, listens on a different address, or Nginx is not allowed to reach its socket.