Question

I have set up Varnish on my centos server which runs my drupal site. Browsing to any page returns a blank page due to 503 :Service Unavailable

I have read many questions and answers about intermittent 503's but this is occurring constantly. I can still browse to the site using www.example.com:8080 .

I am running on Centos 6 using the VCL : https://raw.githubusercontent.com/NITEMAN/Varnish_VCL_samps-hacks/master/varnish3/drupal-base.vcl

I have also tried https://fourkitchens.atlassian.net/wiki/display/TECH/Configure+Varnish+3+for+Drupal+7 .

Not sure where to even start in debugging this.

ADDITIONAL INFO: NITEMANS answer below provides some really helpful debug suggestions. In my case it was something very simple, I had left the default 127.0.0.1 in my default.vcl . Changing this to my real external IP got things working. I hope that is the correct thing to do!

Was it helpful?

Solution

As you're running my sample VCL, it should be easy to debug (try each step separately):

  • Make sure apache is listening on 127.0.0.1:8080 (as it can be listening on another IP and not in the local loopback). netstat -lpn | grep 8080 should help.
  • Rise backend timeouts (if the server is very slow, since defined timeouts are already huge). Requires a Varnish reload.
  • Disable health probe (as Varnish can be marking the backend as sick). Comment probe basic block and probe line on backend default. Requires a Varnish reload.
  • Disable Varnish logic, uncommenting the first return(pipe) on sub vcl_recv. Requires a Varnish reload.

You should also provide when debugging:

  • varnishadm debug.health output
  • varnishlog output for a sample request

Hope it helps!

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top