A gateway or proxy did not receive a timely response from the upstream server.
Quick facts
When does it occur
A gateway or proxy did not receive a timely response from the upstream server.
It belongs to the 5xx Server Error class of responses, defined in RFC7231#6.6.5.
Browse all codes in this class: 5xx Server Error
How to fix it
Increase upstream timeouts, optimize slow queries, and check network connectivity.
Common causes
How to fix it
Double-check the URL, return to the homepage and search again, or retry later.
Increase upstream timeouts, optimize slow queries, and check network connectivity.
Check service logs and health, confirm upstream dependencies, restart or scale if needed, then verify monitoring alerts.
Frequently asked questions
504 belongs to the 5xx Server Error class and is generally not cached for long; behavior is controlled by Cache-Control.
5xx Server Error: A gateway or proxy did not receive a timely response from the upstream server.
Sources & standards
Updated 2026-08-18
Explore this reference
Related status codes