Varnish returns 503 error.

Hugo Cisneiros (Eitch) hugo.cisneiros at gmail.com
Thu Jun 14 00:02:53 CEST 2012


On Wed, Jun 13, 2012 at 5:51 PM, Abraham Cruz Sustaita
<abraham.sustaita at buscacorp.com> wrote:
> I understand varnish have to restart the connection and try again in another app server (I have 5), but it allways returns the 503 error, so I understand that means the rule is being ignored.

The only way to be sure what is happening is to log details from the
requests using varnishlog.

The restart function will reset the request and it goes back to
vcl_recv as if it is a new request. But since you're using saintmode,
maybe varnish isn't really retrying to fetch this particular URL from
the backend. You can do a

if (req.restarts > 3) {
  set beresp.saintmode = 5m;
}

and it will restart at least 2 times before inserting the item on saintmode.

> I have made this change to the vcl file:
[...]
> Do I have to increase also the first_byte_timeout?

You need to increase only if the request isn't getting reply data in
the first 30 seconds :) You can check this with varnishlog and
varnishncsa to be sure.

--
[]'s
Hugo
www.devin.com.br



More information about the varnish-misc mailing list