What the error means
The page looks like this: a large “Error 503 Backend fetch failed”, the words “Guru Meditation” with an XID number, and “Varnish cache server” at the bottom. It is not a WordPress page. It is the default error page of Varnish, a cache server that some hosts and CDNs run in front of WordPress.
Varnish works as a middleman. It keeps copies of pages and serves them fast. When it has no copy (a new page, a logged-in user, a cart, a search), it asks the web server behind it, the backend, for the page. “Backend fetch failed” means that request did not come back with a usable answer, so Varnish answered the visitor with a 503 instead.
The usual reasons:
- The backend is down. The web server or PHP stopped, the server ran out of memory, or it is restarting.
- The backend is too slow. The page took longer than the time limit the host set in Varnish. Heavy pages, slow database queries and plugins waiting on outside services do this.
- The backend answered with something Varnish refused. A connection that closed halfway (PHP crashed mid-page), or response headers too large, for example a plugin that sets dozens of cookies.
- The backend was marked sick. Varnish checks the server regularly and stops sending requests to one that fails its health check.
Confirm it is Varnish, and what fails
- Check the headers. Run
curl -I https://example.com/and look forx-varnish,via: 1.1 varnishor anageheader. They confirm a Varnish layer. - Find out which pages fail. Try the home page, an inner page, a search (
/?s=test), wp-admin and, on a shop, the cart. Cached pages often still load while anything the server must build fails. That pattern points to the backend. - Check other sites on the same server. If they all fail, go straight to the host. If only one does, the cause is on that site.
Fix it, step by step
1. Check the server is running
Open the hosting panel. Look for stopped services, a full disk, memory or CPU at its limit, or a recent restart. Many managed hosts have a button to restart PHP or the web server. Restarting is safe but drops any request in progress, and if the server is overloaded it only buys a few minutes: find what loads it.
2. Find the slow or failing request
Read the error log and, if the host offers one, the PHP slow log for the minutes the error appeared. Look for:
- requests that run for tens of seconds: a big export, a search on a large site, a WooCommerce filter on thousands of products;
- PHP fatal errors or “allowed memory size exhausted”;
cURL error 28or “operation timed out”: a plugin calling an outside service (a license check, a social feed, a currency API) that hangs, holding the page until it gives up.
To time a page yourself, install the free Query Monitor plugin on the site, load the slow page while logged in and read its overview: total time, database queries and the slowest components. Deactivate it when done.
3. Switch off what you find
If one plugin or one outside call is the cause, deactivate the plugin (wp plugin deactivate plugin-name) or turn the feature off in its settings, then load the failing page again. Reactivating it undoes the test. If a single heavy page is the cause, such as a page with hundreds of products, split it or add pagination.
4. Check the headers the site sends
If only some pages fail and the server is not slow, the answer may be too big for the cache. Run curl -sI https://example.com/failing-page/ against the server directly if your host gives you a way past Varnish, and count the Set-Cookie and Link lines. A plugin writing a large cookie on every page is the usual culprit. Fix or replace it, and the error goes.
5. Take load off PHP
A server that fails under normal traffic needs less work per page:
- Make sure Varnish can cache your pages. A page that sets a cookie for every visitor, or sends
Cache-Control: no-cache, is never kept, so every visit reaches PHP. Tracking plugins that set cookies from PHP are a common cause. - Add a persistent object cache (Redis or Memcached) so repeated database lookups come from memory.
- Block bots that hammer search,
xmlrpc.phporwp-login.php. - Ask the host for more PHP workers or memory if the site has simply outgrown its plan.
6. Purge the cache, then check again
Once the backend is healthy, purge Varnish from the hosting panel so no stale or error copies remain. Purge once: emptying the cache while the server is struggling sends every request to PHP at the same time and can bring the error straight back.
7. If it still fails, ask the host
Send the address, the time, the Guru Meditation XID and what you already ruled out. The XID lets the host find the exact request in Varnish’s log and see why the backend failed it.
What can go wrong while fixing it
- Turning off the cache to “fix” it. Bypassing Varnish makes the error disappear and the site slower, and the next traffic peak takes the whole server down instead.
- Restarting in a loop. If memory fills up again within minutes, a restart is hiding a leak or a flood of requests. Read the logs first.
- Fixing the wrong site. On a shared server, one site’s runaway plugin or bot traffic can make its neighbours fail. Check which site the slow requests belong to.
What to tell the client
Keep it short and concrete:
Some visitors saw an error page this morning between 9:10 and 9:40. The cache in front of your site could not get pages from the server in time, because a plugin was waiting on an outside service that had stopped answering. We switched that feature off, the site is back to normal, and we are watching it today.
If the host was at fault, say so, and say what they changed.
How Keptstone handles it
Keptstone’s uptime check runs every minute and counts a 503 as down. Before it alerts anyone it loads the site from four other places on the internet (probes in North America); a server error there too confirms a real outage, and the alert says so. The alert goes out once the outage has lasted 10 minutes. When several of an agency’s sites on one server fail in the same minute, they arrive as one message naming the server, which tells you at once that the server or host is the likely cause rather than one site. Every 15 minutes Keptstone also requests the home page past the cache, which catches the common case where the cached home page still works while every page the server builds fails. Monitoring is in both plans, Care ($2 a site a month) and Care + Protect + Speed ($4).
On Care + Protect + Speed, the speed optimizer can also take load off PHP: a page cache that serves kept copies before plugins load, and an object cache where the host already runs Memcached. Each is tried on a private preview and kept only if the site’s own measurements improve and nothing breaks. More on the checks: uptime monitoring, and on the other errors a down site shows: my website is down.
Questions
What does backend fetch failed mean?
The site sits behind Varnish, a cache server. Varnish passed a visitor's request to the web server behind it (the backend) and did not get a usable answer in time, so it showed its own error page. The cache is fine; the server behind it is the problem.
Is Error 503 Backend fetch failed my fault or the host's?
Either. If every site on the server shows it, the server or the host is at fault. If one site shows it, or only some pages, the cause is usually on that site: a slow plugin, a heavy page, an outside service that hangs, or headers too large for the cache.
Why does the error come and go?
Cached pages keep working while pages that need the server fail, and a server near its limit answers some requests and drops others. That is why the home page often works while search, the cart or wp-admin fail.
What is the Guru Meditation XID?
It is the number Varnish gives the failed request. Send it to the host with the time and the address: it lets them find that exact request in the cache server's logs.