@quan @1984 Ford Laser It was definitely
@quan @1984 Ford Laser It was definitely because I didn't send pings when not sending any messages, It's a mistake on my part ๐
I was so used to browser environment where that part is abstracted that I just forgot about it completely. I haven't tested how long the ping interval can be yet, would be nice if documented
6 Replies
@egg this would be my default guess https://developers.cloudflare.com/fundamentals/reference/tcp-connections/#:~:text=If%20either%20a%20user%20or,alive%20probes%20every%2075%20seconds.
Cloudflare Docs
TCP connections ยท Cloudflare Fundamentals docs
The following section explains how Cloudflare directs traffic efficiently with anycast routing and serves as an intermediary between users and origin servers. The second part covers TCP connections and keep-alives for performance optimization, and lastly, TCP Fast Open (TFO), a protocol extension that enhances the speed of TCP connections.
I'd love to know if this is a requirement for WebSockets to remain open long term (my use case would require hours if possible), because if so then it should be made part of the docs for WebSockets in DOs
Yeah it's required, I implemented pings and don't get 'ghost' connections anymore.
Good to hear its worked for you! I will have a play and see if this helps my client/s be more stable
Thanks I will try it out. I observed before that a 5 min interval worked while 9 min didn't
I didn't really know about this myself til someone else on discord started asking about disconnects. This isn't enforced by Workers/DOs, it's enforced by some place deeper in the Cloudflare stack so we weren't aware of it ๐
. Will look into getting it added to the docs somewhere.