20

I have this error in my site

Error 503 Backend fetch failed

Backend fetch failed

Guru Meditation:

XID: 526707

Varnish cache server

Anyone know what may be the cause or how to find out what happens?

1
  • It happenned to me too. In my case I was requesting for an image that there wasn't on the server. When backend sends to a 500 code, varnish sends to you a 503... Hope it helps. check here: quora.com/…
    – Albeis
    Apr 18, 2017 at 9:09

4 Answers 4

5

There's a common reason that varnish returns 503 that is not explained on the varnish error list. I have learnt this from experience.

If your web server is returning 500 error or similar then varnish simply says Error 503 Backend fetch failed.

what you need to do is to always try to fetch without varnish to see if the error is in varnish or the web server. For example if you have a different hostname for the webserver, load that and find the error, if you fix that, then restart varnish and that solves it most of the time.

0
3

That means that Varnish has been properly configured to accept incoming connections, but is not yet available to serve your backend. This error is common when varnish receives a request but your backend is still restarting/releasing.

1

This can be due to the length of cache tags used by Magento exceeding Varnish’s default of 8192 bytes.

This can be solved by modifying the varnish configs:

  • CentOS 6: /etc/sysconfig/varnish
  • CentOS 7: /etc/varnish/varnish.params
  • Ubuntu: /etc/default/varnish

Find http_resp_hdr_len. If the parameter doesn’t exist, add it after thread_pool_max.

Magento suggests setting http_resp_hdr_len to a value equal to the product count of your largest category multiplied by 21.

For example, setting the value to 65536 bytes should work if your largest category has 3,000 products:

-p http_resp_hdr_len=65536 \

See here: http://devdocs.magento.com/guides/v2.0/config-guide/varnish/tshoot-varnish-503.html

0

We see this on our Drupal site sometimes. Forgive me if you don't follow the Drupal-isms here, but, basically, there are Drupal entities that can reference other content entities (nodes), and in some situations you can have an entity hold many of these references. Let's say you add 4 references to one of these entities but you only specify the content (add IDs) for 3 of them, leaving the fourth one blank, it will result in this error.

Not the answer you're looking for? Browse other questions tagged or ask your own question.