Search tools

Find a tool by name or what it does.

502Bad Gateway

A server acting as a gateway got an invalid response from the server behind it, so it has nothing valid to pass on.

Browse all HTTP status codes

When you see it

The front-facing server is working. Something behind it is not. Common causes are an application that crashed or is restarting, a process listening on a different port than expected, or a backend that returned something malformed.

During a deployment, brief 502s are normal while the old process stops and the new one starts. Sustained 502s mean the new process never came up.

What to do about it

As a visitor, wait and reload. 502s are often short-lived because they usually accompany a restart.

If you run the site, check whether the application process is actually running and listening where the gateway expects it, then read the application log rather than the gateway log. The gateway only knows it got a bad answer, not why.

Often confused with

Look up another one

Open

Type a code, a partial code like 40, or any word from a name or description. Everything runs in your browser.

Filter
Copy format
Status codes

69 of 69 codes. Click a row to copy it.

1xx Informational (4)
2xx Success (10)
3xx Redirection (8)
4xx Client errors (31)
5xx Server errors (16)