Hello, haproxy users,
I am occasionally having problems with backend servers being busy up to their maxconn, with further requests waiting in the backend queue. But when I reload haproxy, everything goes back to normal for several hours again. So it is not an on-going DDoS attack or any other kind of ongoing traffic peak, just some kind of old “stuck” connections. I tried to display the opened sessions for that backend, but I am not sure how to interpret the show sess show-uri output. In which state the following sessions are, and what are they waiting for?
$ echo show sess show-uri | socat /run/haproxy/...sock stdio | grep be=mybackend | head -n 3
0x7f8e0e332c30: proto=tcpv4 src=162...:39215 fe=fe4 be=mybackend srv=myhost401 ts=00 epoch=0x9 age=1h37m calls=5 rate=0 cpu=0 lat=0 rq\[f=1840000h,i=0,an=8000h,ax=\] rp\[f=80040000h,i=0,an=4000000h,ax=\] scf=\[8,40082h,fd=6881,rex=,wex=22m13s\] scb=\[8,1211h,fd=5734,rex=,wex=\] exp=22m13s rc=0 c_exp= uri=“GET https://.../...pdf HTTP/2.0”
0x7f8e0d31a410: proto=tcpv4 src=31...:50988 fe=fe4 be=mybackend srv=myhost401 ts=00 epoch=0x1f age=17m23s calls=5 rate=0 cpu=0 lat=0 rq\[f=1840000h,i=0,an=8000h,ax=\] rp\[f=80070000h,i=0,an=4000000h,ax=\] scf=\[8,482h,fd=4860,rex=,wex=1h43m\] scb=\[8,1211h,fd=797,rex=,wex=\] exp=1h43m rc=0 c_exp= uri=“GET /pics/....png HTTP/1.1”
0x7f8e0e552d10: proto=tcpv4 src=170...:19493 fe=fe4 be=mybackend srv=myhost401 ts=00 epoch=0x1f age=16m59s calls=5 rate=0 cpu=0 lat=0 rq\[f=1840000h,i=0,an=8000h,ax=\] rp\[f=80070000h,i=0,an=4000000h,ax=\] scf=\[8,482h,fd=5936,rex=,wex=1h44m\] scb=\[8,1211h,fd=2233,rex=,wex=\] exp=1h44m rc=0 c_exp= uri=“GET /...pdf HTTP/1.1”
One possible issue is that for unrelated reasons, the frontend has timeout client 7200s. But still I would like to be able to interpret the above output in order to decide whether the session is waiting for a client, for a backend server response, HTTP keepalive, or whatever else. Is it documented somewhere?
Thanks!
-Yenya