diff -Nur haproxy-1.3.12.2-orig/include/types/proxy.h haproxy-1.3.12.2-tst/include/types/proxy.h --- haproxy-1.3.12.2-orig/include/types/proxy.h 2007-09-20 08:47:17.000000000 +0200 +++ haproxy-1.3.12.2-tst/include/types/proxy.h 2007-09-23 14:41:22.000000000 +0200 @@ -123,6 +123,7 @@ unsigned int fullconn; /* #conns on backend above which servers are used at full load */ struct in_addr except_net, except_mask; /* don't x-forward-for for this address. FIXME: should support IPv6 */ unsigned failed_conns, failed_resp; /* failed connect() and responses */ + unsigned retries, redispatches; /* retried and redispatched connections */ unsigned denied_req, denied_resp; /* blocked requests/responses because of security concerns */ unsigned failed_req; /* failed requests (eg: invalid or timeout) */ long long bytes_in; /* number of bytes transferred from the client to the server */ diff -Nur haproxy-1.3.12.2-orig/include/types/server.h haproxy-1.3.12.2-tst/include/types/server.h --- haproxy-1.3.12.2-orig/include/types/server.h 2007-09-20 08:47:17.000000000 +0200 +++ haproxy-1.3.12.2-tst/include/types/server.h 2007-09-23 14:39:04.000000000 +0200 @@ -87,6 +87,7 @@ unsigned failed_checks, down_trans; /* failed checks and up-down transitions */ unsigned failed_conns, failed_resp; /* failed connect() and responses */ + unsigned retries; /* retried connections */ unsigned failed_secu; /* blocked responses because of security concerns */ unsigned cum_sess; /* cumulated number of sessions really sent to this server */ long long bytes_in; /* number of bytes transferred from the client to the server */ diff -Nur haproxy-1.3.12.2-orig/src/backend.c haproxy-1.3.12.2-tst/src/backend.c --- haproxy-1.3.12.2-orig/src/backend.c 2007-09-20 08:47:17.000000000 +0200 +++ haproxy-1.3.12.2-tst/src/backend.c 2007-09-23 14:38:25.000000000 +0200 @@ -568,6 +568,10 @@ { /* we are in front of a retryable error */ t->conn_retries--; + if (t->srv) + t->srv->retries++; + t->be->retries++; + if (t->conn_retries < 0) { /* if not retryable anymore, let's abort */ tv_eternity(&t->req->cex); @@ -638,7 +642,7 @@ if (t->srv) t->srv->failed_conns++; - t->be->failed_conns++; + t->be->redispatches++; t->flags &= ~(SN_DIRECT | SN_ASSIGNED | SN_ADDR_SET); t->srv = NULL; /* it's left to the dispatcher to choose a server */ diff -Nur haproxy-1.3.12.2-orig/src/proto_http.c haproxy-1.3.12.2-tst/src/proto_http.c --- haproxy-1.3.12.2-orig/src/proto_http.c 2007-09-20 08:47:17.000000000 +0200 +++ haproxy-1.3.12.2-tst/src/proto_http.c 2007-09-23 14:53:22.000000000 +0200 @@ -2529,7 +2529,7 @@ if (t->srv) t->srv->failed_conns++; - t->be->failed_conns++; + t->be->redispatches++; t->flags &= ~(SN_DIRECT | SN_ASSIGNED | SN_ADDR_SET); t->srv = NULL; /* it's left to the dispatcher to choose a server */ @@ -3771,15 +3771,18 @@ "