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.
Great job thanks
Thank’s Jim – I try very hard to fix things, I’m glad I could help
Amazing, forgot to search git hub issues this time …
Thanks!
Thank you..
Thanks a lot, it worked for me!
Perfect – Thanks
Thank you, wasted 2 hours of my life trying to solve this bug.
I am glad – I was able to help you out.
I am facing the same issue on 2.3.5-p1 only on home page (domain.com), works fine on other pages e.g. (domain.com/index.php), but this did not help me. Has anyone else face problem like mine?
Amazing you save my life! Thank you very much!
Enjoy