504 Gateway Timeout Error
Visitors see "504 Gateway Timeout" instead of your pages — one server waited for another server to answer, ran out of patience, and gave up.
Common signs of this issue
- Pages show "504 Gateway Timeout", "Gateway Time-out", or "HTTP Error 504" after a long spinning wait.
- The page does not fail instantly — it hangs for 30 seconds, a minute, or longer before the error appears.
- It comes and goes: reloading sometimes works, sometimes gives the same timeout.
- Heavy pages fail first — search results, shop category pages, the WordPress dashboard, imports, or reports — while simple pages still load.
- If you use Cloudflare, the error page may be branded by Cloudflare and say the origin web server timed out.
- It often starts after a traffic spike, a big plugin, a backup or import job, or a change of hosting plan.
Safe checks you can do yourself
None of these require sharing passwords with anyone.
- Note which pages fail and which are fine. If only one heavy page times out, the problem is that page's work, not the whole server. If everything times out, it is server-wide.
- Time it. A 504 after roughly 30, 60, or 120 seconds is a classic timeout limit being hit — that number is a clue your host will want.
- Check whether the site is genuinely down or just slow: try it from your phone on mobile data, and from a service like downforeveryoneorjustme.com. A slow-but-alive site behaves very differently from a dead one.
- Ask what changed in the last few days — a new plugin, a bigger import, a new form or search feature, an added integration with an outside service, or a change in hosting plan.
- If you use Cloudflare, look at whether the error page is from Cloudflare. That confirms your origin server is the slow part, not Cloudflare.
- Check your host's status page and your inbox — timeouts are often the visible symptom of a database server or shared-hosting issue your host already knows about.
- Look at whether anything scheduled runs at the same time each day: overnight backups, exports, or a cron job can hold up the server long enough to time out real visitors.
- If you have a hosting dashboard, look for CPU, memory, or "entry process" limits being hit. On shared hosting these caps are the usual reason a site suddenly starts timing out under no more traffic than last week.
What this usually means
A 504 is a waiting error, not a crash. Something in front of your site — an nginx proxy, a load balancer, or Cloudflare — asked the server that actually builds your pages for a response and never got one in the allowed time. The visitor gets the timeout page instead.
The most common causes are unglamorous: a slow database query, a plugin doing too much work on every page load, an outside service (a payment gateway, a shipping API, a mail server) that has gone unresponsive, or a shared-hosting account hitting its resource cap. In all of those cases the site is not broken so much as overwhelmed.
This matters because the cure follows the cause. If one plugin or one query is the problem, the fix is a change to your site. If the server is out of resources, no amount of site tinkering helps and the honest answer is a better hosting plan. Raising the timeout limit is almost never the real fix — it just makes visitors wait longer before seeing the same error.
What not to do
- Don't just keep reloading. Each retry starts another slow request and can push a struggling server further under.
- Don't assume it is your internet connection — a 504 is generated by a server, so the request reached your site and stalled there.
- Don't start deleting plugins at random on the live site; deactivate one suspected plugin at a time so you can tell what actually helped.
- Don't raise every timeout setting you can find. Longer timeouts hide the symptom, hurt visitors, and can make the server fall over instead.
- Don't ignore a 504 that only hits checkout, the cart, or a form. Those are exactly the pages where a timeout costs money, even if the homepage looks fine.
- Don't move hosts in a panic mid-outage. Migrating a site that is currently timing out is the worst moment to do it.
When to get help
If the timeouts are intermittent and nobody can say which page or process causes them, that is the point to bring in someone who can read server and slow-query logs — the answer is usually sitting in them, and guesswork on a live business site is expensive. It is also worth getting help if your host says the site is using too many resources and you don't know what "too many" refers to: someone who can separate a badly-behaved plugin from a genuinely undersized hosting plan will save you either an unnecessary upgrade or months of recurring outages.
Could your hosting be the problem?
If your host is slow, unreliable, or hard to deal with, moving to a better one can clear up issues like this for good. One we genuinely recommend is Instant Access Internet Services — a smaller, compassionate company with 30 years in the business, known for being one of the fastest, with great management and low pricing. (Just a recommendation — no affiliate link, no kickback.)
Not sure what to do next?
Answer a few short questions and we'll point you to the safest next step — DIY, a freelancer, or a direct review. No passwords required.
Is this a business website? If this issue may be costing you leads, sales, or trust, you may want a direct review instead of trial and error.
Frequently asked questions
What does 504 Gateway Timeout mean?
It means one server was waiting on another server to produce your page and gave up after a set time limit. The request reached your site — it just took too long to answer.
Is a 504 error my fault or my host's?
Either. If only heavy pages time out, something on your site is slow. If everything times out or the timing matches backups and traffic spikes, it is usually a hosting resource problem. Which pages fail is the fastest way to tell the two apart.
What is the difference between a 502 and a 504 error?
A 502 Bad Gateway means the server gave a bad or empty answer. A 504 Gateway Timeout means it gave no answer at all in time. A 502 usually fails fast; a 504 hangs first.
Will a 504 error hurt my Google rankings?
A short episode will not. Repeated timeouts over days will — Google treats a site that regularly fails to respond as unreliable, and crawling slows down accordingly.
Can I fix a 504 by increasing the timeout limit?
Rarely, and it is the wrong first move. A higher limit means visitors stare at a blank tab longer before the same error appears. Find what is slow instead.
Why does my site only time out at certain times of day?
Almost always a scheduled job — backups, exports, indexing, or a cron task — competing with real visitors for the same limited server resources. Moving that job to a quieter hour often clears it up.