Tech News Today
  • News
  • How To
  • Buyer’s Guide
  • Hardware
    • PC Builds
    • Computer Cases
    • Motherboards
    • Peripherals
    • RAM
  • Gaming
  • Software
  • More
    • Mobile
    • Gadgets
    • Laptops
    • Reviews
Facebook Twitter Instagram
Tech News Today
  • News
  • How To
  • Buyer’s Guide
  • Hardware
    • PC Builds
    • Computer Cases
    • Motherboards
    • Peripherals
    • RAM
  • Gaming
  • Software
  • More
    • Mobile
    • Gadgets
    • Laptops
    • Reviews
Tech News Today
Home»Internet»5 Ways To Fix Backend Fetch Failed Error 503

5 Ways To Fix Backend Fetch Failed Error 503

AnupBy AnupApril 17, 2022
error 503 backend fetch failed

Error 503 Backend Fetch Failed is displayed when the HTTP cache fails to fetch the requested data from the webserver.

There could be numerous reasons why it was unable to retrieve the data; the server could be down or unavailable, the connection could’ve closed before the cache server was done reading the response, the backend code or plugins could be at fault, and so on.

Regardless, we’ve listed what you can do both as a user and as the webmaster to fix Backend Fetch Failed Error 503 below.

Table of Contents

  • What causes Error 503 Backend Fetch Failed?
  • What Can You Do as a User / Visitor?
  • How to Fix Backend Fetch Failed Error 503 as a Website Owner?
    • Check Varnish Plugin
    • Modify Cache Tag Length
    • Modify Varnish and NGINX Configuration Files
    • User-Reported Fixes
    • Contact Hosting Provider for Support
  • Related Questions
    • What is Error 503 Backend Fetch Failed Guru Meditation?

What causes Error 503 Backend Fetch Failed?

As the name implies, this error is mostly caused due to backend issues such as overloaded servers (peak hours) or buggy code. One faulty plugin or website on a shared server can also cause this error for other sites hosted on the same server.

On the client-end, heavy packet loss can cause requests to pile up which can also lead to this error in rare cases.

Of course, sometimes the server might just be unable to handle the request because it is down for maintenance, but that’s only a temporary issue that doesn’t need solving.

What Can You Do as a User / Visitor?

As a user, there’s really not a lot you can do since this error occurs due to server-side issues. Nonetheless, here are some general troubleshooting steps you can take to make sure everything is good on your end:

  1. Press F5 or the refresh button and refresh the page multiple times.
  2. Ensure there isn’t too much packet loss with a ping test. If there is, move closer for a stronger connection or use an Ethernet cable.
    Ping-test-sample
  3. Reboot your device and router.
  4. If the browser has a lot of tabs open, close some of them and try loading the website now.
  5. Reset your browser configurations to default. Alternatively, try using a different browser entirely.
  6. Change your DNS and reset your network settings.

If you’ve taken all possible steps from your end, the only thing you can do now is wait. Since this error is often caused due to server overload, the site should work again as soon as the traffic settles down.

Generally, we’d recommend trying to visit the website outside of peak hours, but if you need to access the site urgently, you could contact the site administrator and notify them of the issue.

How to Fix Backend Fetch Failed Error 503 as a Website Owner?

If you installed any new Word Press plugins recently that you suspect may have caused this error, you should first disable/uninstall them.

Even older plugins that were working fine have malfunctioned and caused this error in the past. Fortunately, in cases like this, they get patched very quickly, so you needn’t worry about not having a certain plugin for long.

If deactivating the plugin helped, great! If not, check the solutions below.

Warning: A very common advice for solving Error 503 is to purge all content from the cache. This is NOT recommended unless you’re sure of the cause.

Purging the cache will temporarily increase requests to your origin server. If the Backend Fetch Failed error was caused due to server overload (too many requests) in the first place, this will only add to the problem.

So, purging the cache can be helpful but only do it if you’re sure that the issue wasn’t caused by a traffic spike in the first place. Otherwise, your origin server might take even longer than necessary to resolve all the lined-up requests.

Check Varnish Plugin

If your website uses Varnish cache, you should first determine if the issue is with Varnish or your web server. You can do this by turning off Varnish and trying to fetch without it. Here are the steps to do so:

  1. Log in to your site’s cPanel.
  2. Under the Web Accelerator section, select Manage Varnish > Disable Varnish.
    disable-varnish-cpanel
  3. Press Confirm Action to disable it.
  4. Check if your website loads properly now.

If the site is working now, something is wrong with Varnish. You can re-enable it once to check if restarting fixes the issue. If it doesn’t, you can find out what exactly is wrong by checking the log file which you can create with the steps listed below:

To log entries where varnish response or backend response status is 503, use the following command:
$ varnishlog -q 'RespStatus == 503' -g request

To log all entries >=500, use the following command instead:
varnishlog -a -w /var/log/varnish/varnish50x.log -q "RespStatus >= 500 or BerespStatus >= 500"

Modify Cache Tag Length

The default length of cache tags in Varnish is 8192 bytes. Exceeding this can cause the HTTP 503 Backend Fetch Failed error.

You can resolve this issue by increasing the value of the http_resp_hdr_len parameter in your Varnish configuration file.

http resp hdr len varnish

The Adobe Commerce support site has an excellent article on how to do exactly this.

Modify Varnish and NGINX Configuration Files

The steps listed are for Varnish but the same can apply for NGINX as well. Here are the steps to modify the configuration files:

  1. Locate and open the file from /etc/varnish/default.vcl.
  2. Find the line .url = "/pub/health_check.php"; and remove /pub as such:
                    .url = "/health_check.php";
  3. Or vice versa. If there’s no /pub, try adding it.
    varnish-configuration-file-url-healthcheck
  4. Next, navigate to the Magento 2 root folder and open the ginx.conf.sample file.
  5. Find the following line:
    location ~ (index|get|static|report|404|503)\.php$ {
  6. Edit it by adding health_check as such:
    location ~ (index|get|static|report|404|503|health_check)\.php$ {
  7. Save the changes and restart Varnish.

User-Reported Fixes

Note: User-Reported Fixes generally only apply to niche scenarios but they are still worth checking out.

A user on Stack Exchange reported that another website on the server was causing this issue, which affected his site as well. So if you’re currently hosted on a shared server, this might be something to consider.

One user said the issue was caused by a plugin of the hoster. Once the faulty plugin was disabled, the Backend Fetch Failed error was resolved.

Another user reported that the maintenance.flag file generated by Magento was causing the issue for them. This issue can be fixed by logging into your cPanel and renaming or deleting the maintenance.flag file from the Magento root directory.

Contact Hosting Provider for Support

If you’re still facing the Backend Fetch Failed error, we recommend contacting your hosting provider and asking for support. The error log files created using the steps above may help the support team determine the root of the issue and apply the necessary solutions swiftly.

Related Questions

What is Error 503 Backend Fetch Failed Guru Meditation?

Varnish references Error 503 Backend Fetch Failed Guru Meditation for severe errors such as when the backend server is inaccessible either due to overload, maintenance, or some other reason. It’s kind of like the Blue Screen of Death (BSOD) of website errors.

fix
Anup

I used to be a travel writer. Then I took an arrow in the knee.

Related Posts

how-to-reduce-image-file-size-1

How to Reduce Image File Size to Speed Up Your Website

May 17, 2022
how to configure router to use wpa2

How to Configure Router to Use Wpa2

May 16, 2022
how to turn off low data mode

How to Turn On/Off Low Data Mode on iPhone and Android

May 16, 2022
how-to-restart-a-router

How to Restart a Router in XFINITY, Spectrum, and Eero

May 15, 2022
wifi-faster-than-ethernet1

Why Is My WiFi Faster Than Ethernet

May 12, 2022
default-gateway-not-available

How To Fix “Default Gateway Not Available” Error in Windows

May 10, 2022
Add A Comment

Leave A Reply Cancel Reply

Latest Posts
games-like-7-days-to-die

Best Games Like 7 Days To Die

May 19, 2022
msi camera not working

MSI Laptop Camera Not Working? Here’s How to Fix It

May 20, 2022
how to check gpu temp

How to Check GPU Temperature?

May 18, 2022
You may also like
Gpu-Not-Detected

GPU Not Detected? Try These Fixes

May 19, 2022
how to add a promotion on linkedin

How to Add a Promotion on LinkedIn

May 20, 2022
how to play valorant on mac

How to Play Valorant on Mac

May 19, 2022
Recommended
Cookie Clicker Garden Guide

Cookie Clicker Garden Guide to Unlocking Every Seed

September 26, 2021
monitor no signal

Computer Turns On But Monitor Says No Signal (9 Ways To Fix)

October 25, 2021
Facebook Twitter Pinterest
  • Home
  • About Us
  • Privacy Policy
  • Affiliate Disclosure
© 2022 TechNewsToday.

Type above and press Enter to search. Press Esc to cancel.