HTTP 503 Service Unavailable errors

Lars Jørgensen lajo at
Fri Aug 19 12:34:28 CEST 2011

Hi Henry,

Please have a look at Here you can explicitly configure how Varnish will check the health of each backend.


-----Original Message-----
From: varnish-misc-bounces at [mailto:varnish-misc-bounces at] On Behalf Of Henry M. Umansky
Sent: Thursday, August 18, 2011 4:41 PM
To: varnish-misc at
Subject: HTTP 503 Service Unavailable errors

I recently installed Varnish from the Redhat EPEL repository (Varnish 2.1.5-1.el6.x86_64) and I'm having a slight problem with load balancing. I currently have two backends:

director default round-robin {
    { .backend = { .host = ""; .port = "http"; .connect_timeout = 1s; .first_byte_timeout = 5s; .between_bytes_timeout = 2s; } }
    { .backend = { .host = ""; .port = "http"; .connect_timeout = 1s; .first_byte_timeout = 5s; .between_bytes_timeout = 2s; } } 

and when I shut down Apache on one of the backends and restart Varnish, I get "503 Service Unavailable" errors on random files (usually just one or two files). I never get this error when both backends are running. How does the Varnish probes work, do they ping the backend server to see if they are alive or actually attempt to connect to port 80 to see if Apache is alive? I'm relatively new to Varnish, so I want to apologize if I don't have all the information or missing a configuration somewhere.

Henry Umansky
Web Development Services
Princeton University
humansky at

varnish-misc mailing list
varnish-misc at

More information about the varnish-misc mailing list