OOM caused by infinite loop in response

Delacroix, Gauthier Gauthier.Delacroix at coreye.fr
Fri Sep 21 14:48:56 CEST 2012


This would be a curative fix.

This bug is now fixed, but as I don't always have control over backend applications, I'd like a preventive fix to avoid varnish to crash if it happens again in the future, since when it happens on a single URL, all the service is down.

(I actually would like to avoid varnish to crash in any case ;-) )

I think varnish stability should not depends on backend content, and it would be good to control maximum response body size...

I insist on the fact that backend sends chunked responses. It would be easy to limit size based on content-length header, but I don't have this header in chunked mode...

Gauthier

-----Message d'origine-----
De : Baptiste [mailto:bedis9 at gmail.com] 
Envoyé : vendredi 21 septembre 2012 14:17
À : Delacroix, Gauthier
Cc : Nick Tailor; varnish-misc at varnish-cache.org
Objet : Re: OOM caused by infinite loop in response

Hi,

Can't you simply tells Varnish to return a void response when users hit this URL?
Hopefully you know in advance which URLs are buggy....

cheers

On Thu, Sep 20, 2012 at 1:52 PM, Delacroix, Gauthier <Gauthier.Delacroix at coreye.fr> wrote:
> It's coming from the backend.
>
>
>
> Varnish cannot cache the response since it never ends.
>
>
>
> De : Nick Tailor [mailto:nick.tailor at gmail.com] Envoyé : jeudi 20 
> septembre 2012 12:35 À : Delacroix, Gauthier Objet : Re: OOM caused by 
> infinite loop in response
>
>
>
> If it's coming from the cache set the ttl higher for objects cached so 
> it serves cached content that you know is working until u fix the 
> issue
>
> Sent from my iPhone
>
>
> On Sep 20, 2012, at 2:40 AM, "Delacroix, Gauthier"
> <Gauthier.Delacroix at coreye.fr> wrote:
>
> Hi,
>
>
>
> I have a varnish instance going out of memory because of an infinite 
> loop in a chunked backend response.
>
>
>
> The app is sending the same string over and over, resulting in more 
> than 4GB to varnish in 10 minutes.until it crashes.
>
>
>
> The dev team is fixing the bug in the backend app but I'd like to 
> avoid varnish crashes for this kind of problem.
>
>
>
> I have seen the "http_resp_size" option in the doc but it seems to 
> only handle headers size and I haven't seen anything about response body limit.
>
>
>
> Is there a way to drop connection when response body exceeds a maximum 
> size ?
>
>
>
> Thanks !
>
>
>
> Gauthier
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
>
>
> --
> Ce message a ete verifie par MailScanner.
>
>
> _______________________________________________
> varnish-misc mailing list
> varnish-misc at varnish-cache.org
> https://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc

--
Ce message a ete verifie par MailScanner.




More information about the varnish-misc mailing list