HTTP status codes / 5xx — Server errors

504 Gateway Timeout

In one sentence

The proxy gave up waiting for the upstream to answer.

What it means

A gateway forwarded the request but the origin did not respond within the proxy’s timeout — slow queries, deadlocks, cold starts, or network partitions between proxy and origin.

Common causes

Reproduce it in cURL

curl -i https://httpbin.org/status/504

Same request, no terminal: paste this into the cURL converter for native code, or straight into ReqPad on your phone.

How to debug it

Find the slow hop: time the origin directly, compare with the proxy timeout setting, and look for queries/external calls that exceed it.

Server-side note: Time the origin directly and compare with the proxy timeout (nginx proxy_read_timeout, ALB idle timeout). Fix the slow call or align the timeouts deliberately.

The fastest way to pin down a 504 is to reproduce the exact request and inspect what actually went over the wire — status, headers, timing and body, without your app code in the way. That is what an API client is for; ReqPad does it from your phone, with every request saved to history.

Related codes

500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 503 Service Unavailable · 505 HTTP Version Not Supported · 506 Variant Also Negotiates — or the full reference.

Reproduce that 504 in 10 seconds.

Build the request, send it, read status + headers + timing — on your iPhone. Free to start.