
hugues.alary at gmail
May 13, 2012, 6:11 PM
Post #7 of 9
(474 views)
Permalink
|
Are you specifically not caching 500 responses in your config file? Something like: if(beresp.status == 500) { return (hit_for_pass); } If you're not doing that, then you *are* caching 500 responses. On Sun, May 13, 2012 at 5:20 PM, <Nicholas_Maesepp [at] scee> wrote: > Nothing special about my config file apart from the hashing of objects, I > do have the following already in my vcl_fetch: > > set beresp.grace = 3m; > if (beresp.status == 500) { > set beresp.saintmode = 5s; > } > > ====== > vcl_recv { > set req.grace = 40s; > if (req.request != "GET" && req.request != "HEAD") { > /* We only deal with GET and HEAD by default */ > return (pass); > } > if (req.http.Accept-Encoding && req.url ~ "\.(png|gif|jpg|swf|mov|flv)$") { > remove req.http.Accept-Encoding; > } > return (lookup); > > I'm not convinced that I'm caching 500 responses on all these objects, I > do wonder if its because I remove accept-encoding on those objects, those > are the ones that end up with 500's. But also maybe my saintmode and grace > numbers are too low if the back-end is infact serving 500's. But at least > it's an avenue to explore and get some evidence to prove or disprove it. > Will also try using hit for pass instead and see if that gives me more > resilience. > > > Cheers > > Nick > > > > > From: Hugues Alary <hugues.alary [at] gmail> > To: Andreas Plesner Jacobsen <apj [at] mutt> > Cc: varnish-misc [at] varnish-cache > Date: 05/12/2012 03:29 AM > Subject: Re: Varnish 500's now not 302's > Sent by: varnish-misc-bounces [at] varnish-cache > ------------------------------ > > > > At this point, sending your configuration file would maybe be a good idea. > > On May 11, 2012 1:41 AM, "Andreas Plesner Jacobsen" <*apj [at] mutt*<apj [at] mutt>> > wrote: > On Fri, May 11, 2012 at 09:30:52AM +1100, *Nicholas_Maesepp [at] scee*<Nicholas_Maesepp [at] scee>wrote: > > > I guess technically I realize this is from the cache, my question is more > > along the lines of what could be causing my objects in the cache to > become > > stop being delivered as is and having a 500 error returned. Is my cache > > being corrupted in some way when varnish starts to max out the malloc'ed > > RAM? Seems like a bug to me but can't pinpoint exactly what causes it, > > just that it happens after X amount of time to any of my instances. > > Then you misunderstood me. The 500 is a cached object that your backend > served > at the time. You can avoid caching such objects by inspecting the HTTP > response > in vcl_fetch and setting TTL and/or using hit for pass and/or saint mode. > > It's almost certainly not a bug. > > -- > Andreas > > > * > * > > * > Sony Computer Entertainment Australia Pty Ltd* > Level 1, 63-73 Ann Street Surry Hills NSW 2010 > P.O. Box 5023 Darlinghurst NSW 2010 > ph: +61 (0)2 9324 9500 fax: +61 (0)2 9324 9558 > > *http://au.playstation.com* <http://au.playstation.com/>* > **http://www.facebook.com/PlayStationAU*<http://www.facebook.com/PlaystationAU> > > > * > THE WORLD IS IN PLAY.* > PlayStationŽVita has arrived. > http://www.psvita.com > > * > *[image: PSMOVE] <http://au.playstation.com/psvita> > > ********************************************************************** > This email and any files transmitted with it are confidential and intended > solely for the use of the individual or entity to whom they are addressed. > If you have received this email in error please notify postmaster [at] scee > This footnote also confirms that this email message has been checked for > all known viruses. > Sony Computer Entertainment Australia Pty. Limited > Registered Office: Level 1, 63-73 Ann Street, Surry Hills, NSW 2010 > Australia > Registered in Australia: 077 583 183 > ********************************************************************** > * > Please consider the environment before printing this e-mail* > > > _______________________________________________ > varnish-misc mailing list > varnish-misc [at] varnish-cache > https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc > -- Hugues ALARY
|