Varnish 500's now not 302's
Andreas Plesner Jacobsen
apj at mutt.dk
Mon May 14 09:14:34 CEST 2012
On Mon, May 14, 2012 at 08:13:42AM +0200, Andreas Plesner Jacobsen wrote:
>
> > if (beresp.status == 500) {
> > set beresp.saintmode = 5s;
> > }
>
> And at least using the cached version of 500s for 5 seconds (assuming a single backend).
>
> It shouldn't be too hard to use varnishlog to figure out what happens to these
> objects. Try something like varnishlog -cm TxStatus:500
I just found your original mail, and in that you have varnishlog of a hit to the cache.
What is interesting is finding the original request that put the page in the
cache, but from your original post, it's evident, that you've set a high TTL on
the 500 object (Age: 33236).
In other words: You probably have an unconditional
set beresp.ttl = <something larger than 33236>
somewhere, and that's why varnish will cache your 500.
You should also consider restarting the request after setting saint mode. If
you don't, the request will just be added to the backend's saint mode list, but
the response will still be served to the client.
--
Andreas
More information about the varnish-misc
mailing list