HTTP 503 Service Unavailable errors

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


Hi Henry,

Please have a look at https://www.varnish-cache.org/docs/2.1/tutorial/advanced_backend_servers.html#health-checks. Here you can explicitly configure how Varnish will check the health of each backend.


Lars

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

Hello,
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 = "webhead01.example.com"; .port = "http"; .connect_timeout = 1s; .first_byte_timeout = 5s; .between_bytes_timeout = 2s; } }
    { .backend = { .host = "webhead02.example.com"; .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 princeton.edu
609-258-1674


_______________________________________________
varnish-misc mailing list
varnish-misc at varnish-cache.org
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc




More information about the varnish-misc mailing list