502 Bad Gateway
A proxy reached the backend and got garbage — often a crashed or restarting app.
502Server error
- What it means
- A proxy reached the backend and got garbage — often a crashed or restarting app.
- In practice
- 502 is the reverse proxy speaking: nginx or Caddy asked your application and got a refused connection, a crash mid-response, or bytes that were not HTTP. During deploys a brief 502 window usually means the old process stopped before the new one listened. Persistent 502s: the app is down, listening on the wrong port, or unreachable from the proxy.
- Whose problem is it?
- The server (or something behind it). The request may have been fine.
Often confused with