Back to Blog

Magento 2.12 Varnish 5.0 Error 503 Backend fetch failed **SOLVED** PHP 7.1 Nginx Varnish 5.x

January 27, 20181 min read0 comments
Magento 2.x 503 backend fetch failed varnish This blog is my diary so I can keep track what I fix and what I've learned and today after spending some time and pulling my hair, as we are about to launch our e-commerce site I was able to fix this error - This is a bug which is already reported a few months back. This will work with NGINX - Varnish 4.x or Varnish 5.x
/etc/varnish/default.vcl
Look for
.url = "/pub/health_check.php";
Change the above line to
.url = "/health_check.php";
On NGINX you need to fix the configuration file in my case it's called nginx.conf.sample which are also inside Magento folder. Line looks something like this before the modification # PHP entry point for main application -location ~ (index|get|static|report|404|503)\.php$ { Make changes to the following:- # PHP entry point for main application
location ~ (index|get|static|report|404|503|health_check)\.php$ {
It's a bug which was also reported on Github Don't need your donation a simple THANK You comment is more than enough for me.
Share this article
SK
Written by

Sohaib Khan

View all posts

You might also like

View all

Comments (0)

No comments yet. Be the first to comment!