Short answer
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 on the server returns it, that is a platform problem and belongs at the help desk.
Learn more
- 502 Bad Gateway, 503 Service Unavailable and 504 Gateway TimeoutWhat 502, 503 and 504 errors mean on shared hosting, the difference between a platform problem and a slow site, and what to check.
- “508 Resource Limit Is Reached” and slowdowns under loadWhat a 508 or resource limit error means, how to find what’s consuming CPU, memory or processes, and the fixes that stop it recurring.
- “Maximum execution time exceeded” PHP errorWhy PHP stops long-running scripts, how to work within the limit with batching and cron, and when raising max_execution_time is appropriate.
Step-by-step
- Diagnose a 500 Internal Server ErrorIntermediate · 20 min · 8 steps