HTTP status code
502 Bad Gateway
A proxy, load balancer or CDN in front of your site asked the origin server for the page and got back something it could not use — a crash, a closed connection or garbage.
Common causes
- The application process crashed or is restarting (PHP-FPM, Node, Gunicorn).
- The origin closed the connection before sending a full response.
- The proxy points at the wrong upstream port or host.
How to fix it
- Check that the app process is running and look at its logs around the time of the error.
- Confirm the proxy upstream address and port match where the app listens.
- Raise proxy buffer and header size limits if responses are large.