From: Willy Tarreau Date: Sun, 14 Sep 2008 15:40:09 +0000 (+0200) Subject: [BUG] do not release the connection slot during a retry X-Git-Tag: v1.3.15.4~2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8262d8bd7fdb262c980bd70cb2931e51df07513f;p=thirdparty%2Fhaproxy.git [BUG] do not release the connection slot during a retry A bug was introduced during last queue management fix. If a server connection fails, the allocated connection slot is released, but it will be needed again after the turn-around. This also causes more connections than expected to go to the server because it appears to have less connections than real. Many thanks to Rupert Fiasco, Mark Imbriaco, Cody Fauser, Brian Gupta and Alexander Staubo for promptly providing configuration and diagnosis elements to help reproduce this problem easily. --- diff --git a/src/proto_http.c b/src/proto_http.c index 425fde648e..7500798e77 100644 --- a/src/proto_http.c +++ b/src/proto_http.c @@ -2686,10 +2686,8 @@ int process_srv(struct session *t) } else { fd_delete(t->srv_fd); - if (t->srv) { + if (t->srv) t->srv->cur_sess--; - sess_change_server(t, NULL); - } if (!(req->flags & BF_WRITE_STATUS)) conn_err = SN_ERR_SRVTO; // it was a connect timeout.