varnish default retries on backend timeout?
Traian Bratucu
traian.bratucu at eea.europa.eu
Thu Dec 9 11:48:16 CET 2010
I found the issue myself, perhaps it will help others.
The backend servers were using keep-alive with varnish, and whenever varnish got a timeout from the backend, it would retry the request exactly once (hardcoded) because the initial backend was marked as "recycled".
Disabling keep-alive on the backend servers resolved my issue.
Good luck,
Traian
From: varnish-misc-bounces at varnish-cache.org [mailto:varnish-misc-bounces at varnish-cache.org] On Behalf Of Traian Bratucu
Sent: Tuesday, December 07, 2010 11:37 AM
To: 'varnish-misc at varnish-cache.org'
Subject: varnish default retries on backend timeout?
Hello,
We have been using Varnish for a while and encountered a specific problem I don't seem to be able to figure out. Apparently on a POST request to the backend, for which the backend times out, the request is automatically retried by varnish a second time.
Obviously that is a big problem since POST data gets submitted twice. I do not have any restart statements in the VCL so I guess this is some default Varnish behavior, hopefully controlled by some global parameter.
Here is what I get logged:
-------------
32 Backend c 5 xxx_authenticated black_instance_1
32 FetchError c http first read error: -1 11 (Resource temporarily unavailable)
32 Backend c 87 xxx_authenticated gray_instance_2
32 FetchError c http first read error: -1 11 (Resource temporarily unavailable)
32 VCL_call c error deliver
32 VCL_call c deliver deliver
32 TxProtocol c HTTP/1.1
32 TxStatus c 503
-------------
Is there a way to avoid this double post?
Thank you,
Traian
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.varnish-cache.org/lists/pipermail/varnish-misc/attachments/20101209/1486e7b4/attachment-0003.html>
More information about the varnish-misc
mailing list