A gateway or proxy did not get a response from the upstream server in time.
504 Gateway Timeout is produced by an intermediary (nginx, a load balancer, a CDN, an API gateway) that connected to or waited on the upstream server and gave up before a response arrived. The upstream may still be working on the request, so retrying a non-idempotent request after a 504 can do the work twice.
proxy_read_timeout (60 s by default) or fastcgi_read_timeout expiring: "upstream timed out (110: Connection timed out) while reading response header".| Header | Role |
|---|---|
Server | Shows which layer timed out. |
HTTP/1.1 504 Gateway Timeout
Server: nginx
Content-Type: text/html
<title>504 Gateway Time-out</title>