Varnish still 503ing after adding grace to VCL

Drew Smathers drew.smathers at
Tue Mar 8 21:34:48 CET 2011

On Mon, Mar 7, 2011 at 5:52 PM, Drew Smathers <drew.smathers at> wrote:
> On Mon, Mar 7, 2011 at 5:39 PM, Per Buer <perbu at> wrote:
>> That's "Saint Mode" - please
>> see
>> I see that there isn't too much details on the semantics there. I'll see if
>> I can add some details.
> Hi Per,
> I actually tried using saintmode for this problem but one point that I
> found tricky is that saintmode (as far as i can tell from docs) can
> only be set on beresp. If the backend is up, that's great because I
> can check a non-200 status in vcl_fetch() and set. But in the case of
> all backends being down, vcl_fetch() doesn't even get invoked and
> there isn't any other routine and object in the routine's execution
> context (that I know of) where I can set saintmode and restart.

Sorry to bump my own thread, but does anyone know of a way to set
saintmode if a backend is down, vs. up and misbehaving (returning 500,

Also, I added a backend probe and this indeed caused grace to kick in
once the probe determined the backend as sick.I think the docs should
be clarified if this isn't a bug (grace not working without probe):

Finally it's somewhat disconcerting that in the interim between a
cache expiry and before varnish determines a backend as down (sick) it
will 503 - so this could affect many clients during that window.
Ideally, I'd like to successfully service requests if there's an
object in the cache - period - but I guess this isn't possible now
with varnish?


More information about the varnish-misc mailing list