Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
Hackatosh opened this issue Feb 10, 2023 · 1 comment
Labels
to triage Waiting to be triaged by a member of the team

Comments

@Hackatosh
Copy link

Describe the bug
What we observes :

  • Some of our users disconnect with a "ping timeout" logged server side
  • They try to reconnect multiple times using their current sid, but the server respond with a 400 (Session ID unknown). We have set reconnectAttempts to 3 and they seem to exhaust all the attempts.
  • They try to reconnect with a new sid
  • They encounter another ping timeout, and it starts all over again

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:

  • OS: Docker image built on top of node:16-alpine
@Hackatosh Hackatosh added the to triage Waiting to be triaged by a member of the team label Feb 10, 2023
@maxime1992
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
to triage Waiting to be triaged by a member of the team
Projects
None yet
Development

No branches or pull requests

2 participants