@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
Milan
Milanโ€ข3d ago
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.
Kaleb Ludlow
Kaleb Ludlowโ€ข3d ago
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
egg
eggOPโ€ข2d ago
Yeah it's required, I implemented pings and don't get 'ghost' connections anymore.
Kaleb Ludlow
Kaleb Ludlowโ€ข2d ago
Good to hear its worked for you! I will have a play and see if this helps my client/s be more stable
egg
eggOPโ€ข2d ago
Thanks I will try it out. I observed before that a 5 min interval worked while 9 min didn't
Milan
Milanโ€ข2d ago
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.

Did you find this page helpful?