Experiencing frequent websocket stream reconnects
See original GitHub issueUsing version 1.10 and the sample code from the readme, roughly every minute a reconnect occurs, preceded by the following message:
[ERROR:root] 2019-10-11 16:38:18,582 - Error connecting to CertStream - Connection is already closed. - Sleeping for a few seconds and trying again...
Issue Analytics
- State:
- Created 4 years ago
- Comments:8 (3 by maintainers)
Top Results From Across the Web
Handling connection loss with websockets - Stack Overflow
Client side, connection is simply: var websocket_conn = new WebSocket('ws://192.168.0.5:3000'); websocket_conn. onopen = function(e) { console. log('Connected!
Read more >How to Avoid Multiple WebSocket Connections in a React ...
In this post, you'll learn how WebSocket connections work in a React Chat app and how to avoid concurrent connections with Stream's Chat ......
Read more >Websocket connection disconnecting after ping - Forum
The websocket is closed and our apps tries to reconnect. It does, then the ping disconnect action starts to take place again. We...
Read more >design patterns - Websocket client reconnection best practices
This is such a common function, there must be some best practices and techniques. I can find lots of examples of how to...
Read more >Troubleshooting connection issues | Socket.IO
Since the format of the packets sent over the WebSocket transport is similar in v2 and v3/v4, you might be able to connect...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hey folks, sorry for the delay here.
Digging into this, it looks like cowboy (the underlying websocket server for certstream) will timeout connections after a minute and force reconnection - https://github.com/ninenines/cowboy/issues/1259
I didn’t realize this and figured another mechanism would be handling heartbeats, which doesn’t seem to be the case. I’m going to add heartbeating to this and the other clients which should (hopefully) remedy these timeout issues (the golang client is experiencing this as well - https://github.com/CaliDog/certstream-go/issues/8).
Thanks for the info! Cheers, and happy holidays!