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: [email protected] [mailto:[email protected]] On Behalf Of Traian Bratucu Sent: Tuesday, December 07, 2010 11:37 AM To: '[email protected]' 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
_______________________________________________ varnish-misc mailing list [email protected] http://www.varnish-cache.org/lists/mailman/listinfo/varnish-misc
