Site times out
An HTTP 504 means a gateway waited too long for a response; 502 means it received an invalid response from the service handling the request, not necessarily a timeout. Slow requests, overloaded services, or service failures can cause these errors; neither code confirms that the hosting environment is healthy.
Common causes
- Traffic overload. Visitors or automated crawlers can overwhelm uncached pages, especially searches and product filters. Check whether failures coincide with a traffic spike; avoid broad bot blocks, which can break search crawling and social link previews.
- A slow or stuck plugin operation. Imports, backups, migrations, and bulk actions can run long enough to time out. Deactivate plugins and themes to isolate the plugin.
- A slow external call. If your site waits on an external API that's slow or unreachable, the whole request waits with it. Add a timeout to the call or cache its result.
- A heavy database query. Poorly indexed queries or a bloated database (expired transients, spam, old revisions) can make certain pages crawl. Clean up the database and review slow queries.
- A long-running scheduled task (WP-Cron). WordPress runs scheduled jobs on page loads. A stuck or heavy cron job can slow or time out otherwise-normal requests.
Narrow it down
- Note whether the timeout happens on every page or only specific ones (for example the checkout, an admin screen, or a particular import). A single slow page points at the code that runs on it.
- Check the traffic log in the Panel's Logs tab - its response-time column shows which requests run long.
- Enable WordPress debugging and check
wp-content/debug.logfor errors logged around the time of the timeout.
If failures persist, contact support with affected URLs, timestamps including time zone, the error code, and how long requests take to fail. We can distinguish slow requests from traffic overload or service failures.