502 Bad Gateway, 503 Service Unavailable and 504 Gateway Timeout
What 502, 503 and 504 errors mean on shared hosting, the difference between a platform problem and a slow site, and what to check.
On this page
Does this match what you’re seeing?
- The page shows 502 Bad Gateway, 503 Service Unavailable or 504 Gateway Timeout
- The error comes and goes
- Only slow pages or long tasks fail
All three mean one server in the chain didn’t get a usable response from another in time.
| Error | Means |
|---|---|
| 502 Bad Gateway | An upstream service (such as PHP) returned an invalid response or crashed |
| 503 Service Unavailable | A service is temporarily overloaded or down for maintenance |
| 504 Gateway Timeout | An upstream service took too long to respond |
1. Is it everyone, all the time?
- Check the status page
- Try webmail and DirectAdmin — if those fail too, it’s likely platform-wide. Is it my website or the server? How to tell
2. Only certain pages or actions?
Long-running requests — imports, exports, large searches, backups — can hit timeouts.
- Break jobs into batches, or run them with cron. “Maximum execution time exceeded” PHP error
- Find slow database queries or plugins.
3. Only at busy times?
Your account may be reaching resource limits. “508 Resource Limit Is Reached” and slowdowns under load
4. Behind Cloudflare?
Cloudflare’s own 502/504 pages mean Cloudflare couldn’t get a response from your hosting. Check the site directly, bypassing Cloudflare (set the record to DNS only briefly), to see the underlying error. Cloudflare’s 5xx pages identify whether the problem is at Cloudflare or at the host.
5. WordPress maintenance
A 503 during updates is normal and brief. If it persists: WordPress stuck on “Briefly unavailable for scheduled maintenance”
If it persists with no obvious cause
Report it through the contact form (choose “Something only Traxio can do”), including the URL, the exact error, times and whether it affects the whole site.
Common questions
What do 502, 503 and 504 errors mean?
All three mean the web server could not get a usable response from the process that builds your pages. 502 is a bad response, 503 means the service is unavailable, and 504 means it took too long. On shared hosting they are usually caused by a script exhausting resources.
If it happens intermittently and on a specific page, look at what that page does — a heavy import, an unbounded query or an external API call that hangs. If every page returns it, check the status page: if it shows a problem, Traxio already knows. If the status is green and every page still fails, report it through the contact form (choose “Something only Traxio can do”).
Spotted something out of date or unclear? Tell us and we’ll fix it.