Skip to content

Commit

Permalink
docs: add note about version incompatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
darrachequesne committed Jul 14, 2021
1 parent 1b1859c commit f480b14
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion source/docs/v4/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -198,10 +198,17 @@ First and foremost, please note that disconnections are common and expected, eve

That being said, the Socket.IO client will always try to reconnect, unless specifically told [otherwise](/docs/v4/client-initialization/#reconnection).

Possible explanations:
Possible explanations for a disconnection:

- [The client is not compatible with the version of the server](The-client-is-not-compatible-with-the-version-of-the-server-1)
- [you are trying to send a huge payload](#You-are-trying-to-send-a-huge-payload)

#### The client is not compatible with the version of the server

Since the format of the packets sent over the WebSocket transport is similar in v2 and v3/v4, you might be able to connect with an incompatible client (see [above](#The-client-is-not-compatible-with-the-version-of-the-server)), but the connection will eventually be closed after a given delay.

So if you are experiencing a regular disconnection after 30 seconds (which was the sum of the values of [pingTimeout](/docs/v4/server-initialization/#pingTimeout) and [pingInterval](/docs/v4/server-initialization/#pingInterval) in Socket.IO v2), this is certainly due to a version incompatibility.

#### You are trying to send a huge payload

If you get disconnected while sending a huge payload, this may mean that you have reached the [`maxHttpBufferSize`](/docs/v4/server-initialization/#maxHttpBufferSize) value, which defaults to 1 MB. Please adjust it according to your needs:
Expand Down

1 comment on commit f480b14

@vercel
Copy link

@vercel vercel bot commented on f480b14 Jul 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.