Status codes · one code504 — Gateway Timeout
What a 504 Gateway Timeout response means, who is at fault, what a visitor should do and what the server owner should do.
Open the reference on this codeWhat to do
If it is someone else's site
Try again later: the request arrived but the server did not answer in time. If the 504 keeps happening on the same heavy page — a large report, say — it is not your connection, and waiting longer will not help.
If it is your server
Do not raise proxy_read_timeout first: that hides the symptom and leaves the request hanging longer, holding a connection. Find the slow step first — in the application log, by response time — and decide whether it is honestly long. If it is, move that work to the background and deliver the result separately; raise the limit only for it rather than for the whole server.
Easily confused with
the mirror case — there it is the client that failed to finish sending in time.
408 →the server refused immediately instead of staying silent until the timeout.
503 →How to check
how many seconds the upstream really takes, with no proxy involved
which addresses hit the timeout most often
The reference holds sixty-four codes searchable by number, name and meaning — plus a breakdown of confusing pairs such as 401 and 403.
Updated