You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Haproxy 3.3.X: peer server not responding - timeout #3234
That's not cool at all, but thanks for the first report of the year! Could you please issue a "show peers" on the CLI so that we get a snapshot of internal states etc ? I suspect that applets are stuck for whatever reasons I currently ignore :-/
Thanks! I must confess I'm not fluent in peers :-) Since you say you reproduced it in test environment, how did you proceed to observe this ? And was it quick to reproduce ? (i.e. do you think we have some hope to bisect it ?).
You can for sure bisect it since it works just fine on HAProxy 3.2.9, but fails on HAProxy 3.3.1. I haven't tested it, but I'm pretty sure it will fail on 3.3.0 too.
In my case I cannot trigger it, in your case does curl immediately return with an error ? Here's what I'm having:
Fri Jan 2 18:45:24 CET 2026
18:45:24.826337 [0-0] * [SETUP] added
18:45:24.826367 [0-0] * Trying 127.0.0.1:8082...
18:45:24.826414 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=0
18:45:24.826428 [0-0] * [SETUP] Curl_conn_connect(block=0) -> 0, done=1
18:45:24.826437 [0-0] * Established connection to 127.0.0.1 (127.0.0.1 port 8082) from 127.0.0.1 port 38098
18:45:24.826454 [0-0] * [SETUP] query ALPN
18:45:24.826460 [0-0] * using HTTP/1.x
18:45:24.826481 [0-0] > GET / HTTP/1.1
18:45:24.826481 [0-0] > Host: 127.0.0.1:8082
18:45:24.826481 [0-0] > User-Agent: curl/8.17.0
18:45:24.826481 [0-0] > Accept: */*
18:45:24.826481 [0-0] >
18:45:24.826516 [0-0] * Request completely sent off
18:45:24.826639 [0-0] * Received HTTP/0.9 when not allowed
18:45:24.826648 [0-0] * closing connection #0
curl: (1) Received HTTP/0.9 when not allowed
Even if I reduce the sleep delay, after hundreds of attempts it continues to run flawlessly. That's why I'm suspecting a race condition, which might not be easy to spot.
In my case I cannot trigger it, in your case does curl immediately return with an error ?
Yes, I reduced the curl connect to 2s, and it started to fail after 2/3mn of HAProxy process being up while true; do date; curl --connect-timeout 2 -vv 127.0.0.1:8082; echo ""; sleep 2; done
That's why I'm suspecting a race condition, which might not be easy to spot.
Yes, I suspected something like that too ... But in my env, I'm able to reproduce this all the time on HAProxy 3.3.1.
Let me know if you think of something I could enable or logs (or maybe add a custom patch to enable some) that could help pin point the issue. Thx!
@mougams, are you able to reproduce the issue by commenting the 2nd peer line (peer 127.0.0.1_10004 127.0.0.1:10004) ? In that case, you may enable the peers and applet traces.
* Rebuilt URL to: 127.0.0.1:8082/
* Trying 127.0.0.1...
* TCP_NODELAY set
* Connection timed out after 2001 milliseconds
* Closing connection 0
curl: (28) Connection timed out after 2001 milliseconds
I'll activate more logs and dig more on my side. Will let you know.
Activity
wtarreau commentedon Jan 2, 2026
Hi Basha!
That's not cool at all, but thanks for the first report of the year! Could you please issue a "show peers" on the CLI so that we get a snapshot of internal states etc ? I suspect that applets are stuck for whatever reasons I currently ignore :-/
mougams commentedon Jan 2, 2026
You're welcome 😄
Here is the command output
I reproduced it in a test environement, but this also happens in preprod, where there are more than 1 peer.
And this works all the time on HAProxy 3.2.X - I ran a loop curl for 30mn w/o issues.
wtarreau commentedon Jan 2, 2026
Thanks! I must confess I'm not fluent in peers :-) Since you say you reproduced it in test environment, how did you proceed to observe this ? And was it quick to reproduce ? (i.e. do you think we have some hope to bisect it ?).
mougams commentedon Jan 2, 2026
First I noticed it in our preprod in our HealthCheck dashboard, all our healthcheck for peers were red.
In my test environment, with HAProxy started with the conf pasted above, I simply curled in a loop
while true; do date; curl --connect-timeout 10 -vv 127.0.0.1:8082; echo ""; sleep 2; doneAnd I started to observe multiple timeout after some time. FYI, at startup, the endpoint responds correctly.
mougams commentedon Jan 2, 2026
You can for sure bisect it since it works just fine on HAProxy 3.2.9, but fails on HAProxy 3.3.1. I haven't tested it, but I'm pretty sure it will fail on 3.3.0 too.
wtarreau commentedon Jan 2, 2026
OK thanks, I'll try with this, that's exactly what I needed.
wtarreau commentedon Jan 2, 2026
In my case I cannot trigger it, in your case does curl immediately return with an error ? Here's what I'm having:
Even if I reduce the sleep delay, after hundreds of attempts it continues to run flawlessly. That's why I'm suspecting a race condition, which might not be easy to spot.
wtarreau commentedon Jan 2, 2026
I also tried adding a table attached to these peers to try to have updates to be sent, but to no avail for now.
mougams commentedon Jan 2, 2026
Yes, I reduced the curl connect to 2s, and it started to fail after 2/3mn of HAProxy process being up
while true; do date; curl --connect-timeout 2 -vv 127.0.0.1:8082; echo ""; sleep 2; doneYes, I suspected something like that too ... But in my env, I'm able to reproduce this all the time on HAProxy 3.3.1.
Let me know if you think of something I could enable or logs (or maybe add a custom patch to enable some) that could help pin point the issue. Thx!
wtarreau commentedon Jan 2, 2026
Just to be sure, this is with the same config as above (i.e. no stick-table), and in absence of any traffic, right ?
mougams commentedon Jan 2, 2026
Yep, that's correct.
And we have a stk aggregator (hapee-extras-stktagg-1.0-44.95.rhel-8.x86_64.rpm) listening on port 10004 on this host.
mougams commentedon Jan 2, 2026
And just saw that a newest version of stk aggregator has been released recently in december
hapee-extras-stktagg-1.0-44.96.rhel-8.x86_64.rpm 2025-12-11 09:35 61KI'll bump it next week.
wtarreau commentedon Jan 2, 2026
OK so maybe I need to have another peer listening on port 10004 as well, in case it makes any difference. Still not stuck after an hour or so.
capflam commentedon Jan 5, 2026
@mougams, are you able to reproduce the issue by commenting the 2nd peer line (
peer 127.0.0.1_10004 127.0.0.1:10004) ? In that case, you may enable the peers and applet traces.capflam commentedon Jan 5, 2026
FYI, I found an issue with client timeout handling in the peer applet in 3.3. I don't know if it is related to your issue, but I'm digging.
mougams commentedon Jan 5, 2026
Hello @capflam - even by commenting the line
# peer 127.0.0.1_10004 127.0.0.1:10004after some time, I got some timeout
I'll activate more logs and dig more on my side. Will let you know.
capflam commentedon Jan 5, 2026
@mougams, here is a patch fixing the issue I found on the peer applet. It can be applied on top of the 3.3.1. Could you test it ?
0001-BUG-MEDIUM-peers-Properly-handle-shutdown-when-tryin.patch.txt
mougams commentedon Jan 5, 2026
Nice catch @capflam ! I confirm that this fixes the issue 😄
It's been running w/o issue for almost 1 hour.
BUG/MEDIUM: peers: Properly handle shutdown when trying to get a line
capflam commentedon Jan 5, 2026
Thanks for the test. Now merged !
BUG/MEDIUM: peers: Properly handle shutdown when trying to get a line