Too many 503 backend errors

Anand Shah imanandshah at gmail.com
Thu Dec 23 11:24:24 CET 2010


Thanks rob,

I tried saint mode to handle 503 requests, but m facing write errors now; is
there any way i can efficiently.

if (beresp.status == 503) {
    set beresp.saintmode = 10s;
    restart;
  }
  set beresp.grace = 5m;


I have a couple of questions regarding this issue:

1. It seems to me that Varnish fails when it tries to write the
request to the backend -- is this correct?

2. The integer value '11' reported in "backend write error: 11" --
is it the value of ``errno`` for the failed call to `write`?

3. If above is correct: In the platform where Varnish is
running, 11 seems to correspond to EAGAIN:

$ python -c 'import errno; print errno.EAGAIN'
11
$

Is there any way of telling Varnish to try the write(2) again?


  834 FetchError   c backend write error: 11
  834 VCL_call     c error deliver
  834 Length       c 488
  834 VCL_call     c deliver deliver
  834 TxProtocol   c HTTP/1.1
  834 TxStatus     c 503
  834 TxResponse   c Service Unavailable
  834 TxHeader     c Content-Type: text/html; charset=utf-8
  834 TxHeader     c Content-Length: 488
  834 TxHeader     c Date: Thu, 23 Dec 2010 09:59:50 GMT
  834 TxHeader     c Connection: close


Regards,
    Anand

On Thu, Dec 23, 2010 at 3:02 PM, Robert Shilston <rtshilston at gmail.com>wrote:

> Anand,
>
> My VCL extract coped with a backend failure - if all backends fail on their
> monitoring probe (which, for example, might monitor any database replication
> lag etc), then Varnish will fail over to sending requests to any backend,
> regardless of its perceived health.  This allows for the possibility of
> service continuing in a worst case scenario, whilst still behaving well when
> there's just a partial degradation of backends.
>
> Rob
>
> On 23 Dec 2010, at 08:05, Traian Bratucu wrote:
>
> > Anand,
> >
> > You may want to look at grace mode, it could resolve your issue. When the
> backend is too busy you can serve stale content for a minute or something.
> >
> > Have a look:
> http://www.varnish-cache.org/docs/trunk/tutorial/handling_misbehaving_servers.html
> >
> > Traian
> > ________________________________________
> > From: varnish-misc-bounces at varnish-cache.org [
> varnish-misc-bounces at varnish-cache.org] On Behalf Of Anand Shah [
> imanandshah at gmail.com]
> > Sent: Thursday, December 23, 2010 6:26 AM
> > To: Robert Shilston
> > Cc: varnish-misc at varnish-cache.org
> > Subject: Re: Too many 503 backend errors
> >
> > Thanks robert,
> >
> > But i have already tried all this stuff's. The problem with probing is
> that if your back-end is unhealthy for a second and if varnish declares it
> unhealthy due to some reason than it shows backend unhealthy for next 5 mins
> or so whereas the interval is only 5s. So if i m running on one back-end all
> the requests for this backend fails.
> >
> > The one i m using is a very domain with 3000 req/s.
> >
> > so cannot afford a second of unhealthy network or unreachability.
> >
> > Regards,
> >     Anand
> >
> >
> > _______________________________________________
> > varnish-misc mailing list
> > varnish-misc at varnish-cache.org
> > http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101223/cc39f5a8/attachment-0003.html>


More information about the varnish-misc mailing list