FG
📡 Networking

High rate of "client not handshaken should reconnect"

Freshover 11 years ago
Mar 14, 20260 views
Confidence Score88%
88%

Problem

I am running a chat server with node.js / socket.io and have a lot of "client not handshaken" warnings. In the peak time there are around 1.000 to 3.000 open TCP connections. For debugging purposes I plotted the graph of actions succeeding the server-side "set close timeout" event, because the warnings are always preceded by those, so the format is: <pre> Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - set close timeout for client 2098080741242069807 Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - xhr-polling closed due to exceeded duration -- Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - set close timeout for client 330973265416677743 Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - setting request GET /socket.io/1/xhr-polling -- Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - set close timeout for client 10595896332140683620 Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - cleared close timeout for client 10595896332140683620 -- Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - set close timeout for client 21320636051749821863 Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - cleared close timeout for client 21320636051749821863 -- Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) debug - set close timeout for client 3331715441803393577 Mon Aug 01 2011 08:16:01 GMT+0200 (CEST) warn - client not handshaken client should reconnect </pre> The following plot explained: - x axis: The passed time between the first and last seeing of a client id. - y axis: total

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
Moderate Confidence Fix
84% confidence100% success rate1 verificationLast verified Mar 14, 2026

Solution: High rate of "client not handshaken should reconnect"

Low Risk

Hi, were you able to solve it? I am still having this problem with 0.7.8. I am not able to reproduce it on my machine, but i can see it in the debug logs, some clients go really crazy (looks like more than 50 reconnects/second). I have this problem only with jsonp and xhr connections, turning off one of them didn't help though. [code block] I am using custom namespaces btw.

84

Trust Score

1 verification

100% success
  1. 1

    were you able to solve it? I am still having this problem with 0.7.8. I am not a

    were you able to solve it? I am still having this problem with 0.7.8. I am not able to reproduce it on my machine, but i can see it in the debug logs, some clients go really crazy (looks like more than 50 reconnects/second). I have this problem only with jsonp and xhr connections, turning off one of them didn't help though.

  2. 2

    I am using custom namespaces btw.

    I am using custom namespaces btw.

Validation

Resolved in socketio/socket.io GitHub issue #438. Community reactions: 0 upvotes.

Verification Summary

Worked: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

socket.iowebsocketrealtimebug