DELAPARRA
Index
Color
NL
Category: HTTP status codes

504 Gateway Timeout

Explained by Updated

What is 504 Gateway Timeout?

504 Gateway Timeout: The server was acting as a gateway and did not receive a timely response from upstream. 504 Gateway Timeout means a proxy or load balancer waited for your application and gave up. The application was reachable but took too long to answer. The usual cause is a slow request: a heavy database query, a call to an external API that hangs, or a report generated during the request. The proxy's timeout, often 30 or 60 seconds, runs out first.

Definition source Coders Lingo, CC BY 4.0

Frequently asked questions about 504 Gateway Timeout

What should you keep in mind with 504 Gateway Timeout?

Raising the timeout hides the problem but rarely solves it. Find out what is slow, using logs or a profiler. Add a missing index, cache the result, or move the work to a background job that notifies the user when it is done. Calls to external services should always have their own, shorter timeout, so one slow partner cannot take down your whole application.

At a glance

CategoryHTTP status codes
Explained by
Updated

More HTTP status codes terms

All terms starting with a number or symbol

Skills

Download all skills (zip)

Manuals

Related services

Need any help?

Stuck on one of these in your own project? Tell me what you are working on and I will tell you how I would approach it.