{"issue":{"user":{"id":932156,"login":"squidfunk","url":"https://api.github.com/users/squidfunk","avatar_url":"https://secure.gravatar.com/avatar/73953f8e9271f1f203a5842f6c7ef385?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"73953f8e9271f1f203a5842f6c7ef385"},"milestone":null,"title":"High rate of \"client not handshaken should reconnect\"","created_at":"2011-08-01T10:15:22Z","labels":[{"name":"Bug","url":"https://api.github.com/repos/LearnBoost/socket.io/labels/Bug","color":"e10c02"},{"name":"Handshakes","url":"https://api.github.com/repos/LearnBoost/socket.io/labels/Handshakes","color":"FFD700"},{"name":"Performance","url":"https://api.github.com/repos/LearnBoost/socket.io/labels/Performance","color":"e102d8"}],"updated_at":"2011-12-21T05:17:46Z","state":"open","id":1321978,"html_url":"https://github.com/LearnBoost/socket.io/issues/438","closed_at":null,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"body":"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.\r\n\r\nFor 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:\r\n\r\n<pre>\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - set close timeout for client 2098080741242069807\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - xhr-polling closed due to exceeded duration\r\n--\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - set close timeout for client 330973265416677743\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - setting request GET /socket.io/1/xhr-polling\r\n--\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - set close timeout for client 10595896332140683620\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - cleared close timeout for client 10595896332140683620\r\n--\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - set close timeout for client 21320636051749821863\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - cleared close timeout for client 21320636051749821863\r\n--\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   debug - set close timeout for client 3331715441803393577\r\nMon Aug 01 2011 08:16:01 GMT+0200 (CEST)   warn  - client not handshaken client should reconnect\r\n</pre>\r\n\r\nThe following plot explained:\r\n\r\n- x axis: The passed time between the first and last seeing of a client id.\r\n- y axis: total amount of clients for a given time x terminating with a specific message (client not handshaken, cleared close timeout, etc.)\r\n\r\n![Plot](http://img135.imageshack.us/img135/1606/screenshot1ab.png) [Full size](http://img135.imageshack.us/img135/1606/screenshot1ab.png)\r\n\r\nI did not change the default timeouts and intervals provided by socket.io, but I think it is very strange, that there is a peak of handshake errors at around 10 seconds (even surpassing the successful cleared close timeouts!). Did anyone experience a similar situation?\r\n\r\nBest regards,\r\nMartin","number":438,"url":"https://api.github.com/repos/LearnBoost/socket.io/issues/438","comments":104,"assignee":null},"comment":{"user":{"id":231255,"login":"denisu","url":"https://api.github.com/users/denisu","avatar_url":"https://secure.gravatar.com/avatar/5465c6ad72ec586d0035fb5beb2605bb?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"5465c6ad72ec586d0035fb5beb2605bb"},"created_at":"2011-12-21T05:17:46Z","updated_at":"2011-12-21T05:17:46Z","id":3229793,"body":"Nice, this is the first attempt that looks legit. I have just deployed it to a site with about 2k connections, i will let you know in a day or two how it goes.","url":"https://api.github.com/repos/LearnBoost/socket.io/issues/comments/3229793"},"action":"created"}