High rate of "client not handshaken should reconnect"
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
Solution: High rate of "client not handshaken should reconnect"
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.
Trust Score
1 verification
- 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
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
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep