All pages are working fine and the only home page is giving error:

Error 503 Backend fetch failed

with varnish 4 enabled

  • have you increased the first-byte time out? – Bilal Usean May 7 '18 at 15:10

50x backend error indicates your site has a server error on the home page.
to investigate, you may find the server error log (apache log or nginx log more than likely).
Also, if you clear varnish cache first and then refresh the home page, you may see whether the error appears straight away of whether the page is slow to load and then after long time, shows the error

--> the first case would mean you have a code issue: php error, module conflict, invalid query

--> the second may be a timeout: API timeout, collection loading too much data..

Now, because the origin is so varied and likely depending on the modules you have installed, it is not a question that will have a good answer unless you get you site looked at by a developer

| improve this answer | |
  • It works with http://example.com?1 but throws error on http://example.com. Clearing cache is not fixing either. Strange. – Adarsh Khatri Sep 17 at 23:49
  • Directly clearing varnish cache helped. varnishadm "ban req.http.host == xxx.com". – Adarsh Khatri Sep 17 at 23:52

I've found the issue and solved.

i was using return 301 https://www.domain.com$request_uri; on port 80 so varnish stop using it as a backend, by creating a new server block on port 8080 as varnish backend issue resolved.

| improve this answer | |
  • 1
    can you explian step by step? is not clear your answer – Luca Cagnassi Apr 4 '19 at 15:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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