HTTP 504: Gateway Timeout

The gateway did not get a timely response from the upstream server.

What it means

The gateway did not get a timely response from the upstream server. Server errors mean a valid request failed on the server or a service behind it.

Common causes

Slow database queries, long-running requests, upstream overloaded.

How to fix it

Optimize slow endpoints, raise proxy timeouts carefully, and add caching.

If you are a visitor

The problem is on the website side. Wait a few minutes and reload. If it persists, check whether the site is down for everyone with the site down checker.

If you own the site

Retrying later often works. If it keeps happening, the site owner must fix the server. Short 5xx outages are usually tolerated, but errors lasting hours can make Google slow its crawling, and days of errors can drop pages from the index. A 503 with a Retry-After header is the right signal for planned downtime. Run the HTTP status checker to see exactly what your URL returns, and use uptime monitoring to be told when it changes.

Frequently asked questions

What does HTTP 504 mean?

Gateway Timeout: The gateway did not get a timely response from the upstream server.

Is HTTP 504 an error?

Yes. Server errors mean a valid request failed on the server or a service behind it.

Does HTTP 504 affect SEO?

Short 5xx outages are usually tolerated, but errors lasting hours can make Google slow its crawling, and days of errors can drop pages from the index. A 503 with a Retry-After header is the right signal for planned downtime.

Should I retry after HTTP 504?

Retrying later often works. If it keeps happening, the site owner must fix the server.