Quantcast
Channel: HAProxy community - Latest topics
Viewing all articles
Browse latest Browse all 4849

Why Are WebSocket Connections Dropping in HAProxy TCP Mode Despite Timeout Settings?

$
0
0

Hello

I am running into an odd issue where long-lived WebSocket connections proxied through HAProxy in TCP mode are getting reset unexpectedly. :slightly_smiling_face:The disconnections occur after a few minutes of idle time; even though I have disabled / extended all relevant timeout settings like timeout client, timeout server,& timeout tunnel. What’s strange is that there’s no clear logging from HAProxy indicating why the connection was dropped. :innocent:

When I connect to the WebSocket backend directly, everything works perfectly even idle connections stay alive indefinitely. But once I put HAProxy in the middle (in TCP mode); the issue arises intermittently. :thinking:

Switching to HTTP mode avoids the problem; but I need raw TCP for binary messaging in this WebSocket implementation, so I can’t use HTTP mode as a workaround. :thinking:

What else should I check? Could there be something lower-level like OS-level TCP keepalive settings, NAT timeouts / HAProxy’s own buffer handling in TCP mode causing silent resets? :thinking: Checked The Four Essential Sections of an HAProxy Configuration guide for reference. While exploring system behavior for projects related to what is Agentic AI; I began noticing frequent WebSocket disconnects when routed through HAProxy in TCP mode.

Has anyone encountered similar behavior? Any ideas or examples would be really helpful.

Thank you !! :slightly_smiling_face:

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 4849

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>