HTTP 504 Gateway Timeout
In short: A gateway waited too long for the response of the server behind it.
In more detail: The backend answers, but too slowly.
In Depth
Possible causes
- Slow database query or external API.
- Proxy time limit too small.
Solutions
- Optimise the slow spot (index, caching).
- Raise timeouts appropriately.
- Move long tasks into background jobs.
See also: HTTP 502 Bad Gateway, Latency, Database