socketio / socket.io

Realtime application framework (Node.JS server)
https://socket.io
MIT License
61.28k stars 10.12k forks source link

Socketio client keeps reconnecting after ping timeout, even after exhausting all reconnection attempts #5116

Open Hackatosh opened 1 year ago

Hackatosh commented 1 year ago

Describe the bug What we observes :

And this goes on and on and on. Some of our users are making more than 100 000 requests a day to our websockets server only to do all those reconnections. We noted that the impacted clients seems to exclusively use long-polling and never upgrade to websocket

What I do not understand is why does the socketio client try to connect with another sid after exhausting the 3 reconnection attempts.

To Reproduce

We managed to reproduce the problem by using a Chrome browser and limiting the bandwith to 1kb/s.

Socket.IO server version: 4.6.0 Socket.IO client version: 4.6.0

Expected behavior We expect the reconnection to stop after exhausting all the reconnect attempts

Platform:

maxime1992 commented 9 months ago

Interesting. I wonder if that's what I encountered as well here