What does 504 Gateway Timeout mean?
A gateway or proxy timed out waiting for the application server.
Common causes
- Slow database query or external API
- Long-running work in the request
How to fix it
- Move slow work to a background job
- Increase the proxy timeout only as a last resort
504 and webhooks
Typical when the handler does heavy work before answering — return 200 first, process later.
Test how your client handles 504
In the webhook tester you can add a response rule that answers 504 — useful to check retries, error handling and alerts before production.
FAQ
What does HTTP 504 mean?
Upstream did not answer in time. A gateway or proxy timed out waiting for the application server.
Is 504 an error?
Yes — a server error: the request may succeed if retried later.
Other 5xx codes
500 Internal Server Error · 501 Not Implemented · 502 Bad Gateway · 503 Service Unavailable · 505 HTTP Version Not Supported · 507 Insufficient Storage · 508 Loop Detected · 511 Network Authentication Required · 520 Web Server Returned an Unknown Error · 521 Web Server Is Down · 522 Connection Timed Out · 523 Origin Is Unreachable · 524 A Timeout Occurred · 525 SSL Handshake Failed · 526 Invalid SSL Certificate