504 Gateway Timeout
A 504 means the answer was coming. The front door stopped waiting.
Gateway Timeout is the patience error: the backend was working on your page — a slow database query, a hung API call, an import chewing forever — and the proxy in front gave up before it finished. Something in the chain is slow enough to be indistinguishable from broken.
Same-day diagnosis. Flat quote before any fix.
What’s actually happening
Every proxy has a stopwatch: ask the backend for a page, wait so many seconds, then declare failure. A 504 means the stopwatch won. The page might even have finished eventually — nobody was still listening. That makes 504s the surface symptom of a depth problem: something underneath takes catastrophically long, at least sometimes.
The 'sometimes' is the diagnostic gold. 504s on one specific action — saving a big post, running a report, checkout under load — point at that action's query or external call. Random 504s across the site point at the database or an external service everything waits on. The pattern names the suspect before any log is opened.
The usual causes, ranked
After twenty-seven years of these calls, the odds are well mapped. Start at the top.
A slow or locked database query
One unindexed query on a grown table, or a plugin scanning everything on every load. Fine at 1,000 rows; fatal at 1,000,000. The leading cause on aging WordPress sites.
A hung external call
The page waits on a third-party API — payment, shipping, some plugin phoning home — that's down or slow. Your site inherits their outage as your 504.
Heavy operations outrunning the limit
Imports, exports, image regeneration, big saves — legitimate work that simply takes longer than the proxy allows. Real work, wrong lane.
An underpowered or overloaded backend
Everything is slow, so everything sometimes crosses the line. The 504 version of needing the capacity-or-culprit conversation.
What you can safely try first
Nothing below can make things worse — that’s the selection criterion. Anything riskier belongs in professional hands, on a backup.
- 1
Note exactly what triggers it
Specific action, specific page, or random? 'Saving product edits' versus 'sometimes, anywhere' are different investigations — and this one observation shortcuts both.
- 2
Check if a service you depend on is down
If pages wait on a payment, shipping, or feed API, that provider's status page may be your whole answer. Your 504 can be somebody else's outage wearing your domain.
- 3
Try the same action at a quiet hour
Succeeds at 6 a.m. and fails at noon? Load-sensitivity confirmed — a capacity and query-efficiency conversation with data behind it.
Stop and call when…
- The trigger is a specific query or action — that's profiler-and-index work, done properly on a copy
- The slow link is an external service embedded in your pages — decoupling it needs engineering, not settings
- 504s hit checkout or lead forms — every occurrence has a dollar value and same-day is the right speed
From there it’s our job: same-day look, flat quote, and the $229 flat repair covers most cases of exactly this.
Single Error Fix — buy it now, skip the hunt.
One error, hunted down and fixed — 500s, white screens, redirect loops, broken pages.
Covers one specific error or broken behavior on one site. Diagnosis, the fix, and a plain-English note on what happened. If we can't fix it, you get a full refund.
Questions we hear a lot.
Can I just ask my host to raise the timeout?
You can, and it occasionally even helps — but it treats the stopwatch instead of the slowness. A page taking 90 seconds isn't fixed by allowing 120; visitors leave at 5. The timeout raise is a tourniquet while the actual slow thing gets found and fixed.
Why do 504s happen mostly on my admin side?
Because admin actions do the heavy lifting — big queries, saves, imports, reports — exactly the operations most likely to outlast the stopwatch. It's the same underlying slowness; the admin just exercises it hardest. Bonus: admin-side 504s often predict front-end ones as the site grows.
What does the flat fix cover?
Finding the slow thing with evidence — query profiling, external-call audit, load correlation — and fixing it where it lives: the index added, the plugin replaced, the external call made asynchronous, or the documented host escalation. $229, refunded if we can't move it.
Related symptoms & help
Errors travel in packs. If this one visited, check its friends.
Find what's slow before the stopwatch does.
Send the symptom, get a same-day look and a flat quote from the developer who's fixed this exact thing more times than either of us can count.