node.js - socket.io: bad request error at high trafic -


when run socket.io chat application high load (+500 connections), receive error

websocket connection 'ws://myip:1400/socket.io/?eio=3&transport=websocket&sid=glqpwrhtgjcn9lfhaaoo' failed:  connection closed before receiving handshake response socket.io.js:95 http://myip:1400/socket.io/?eio=3&transport=polling&t=1437426459994-177&sid=glqpwrhtgjcn9lfhaaoo  400 (bad request)17.request.create @ socket.io.js:95request @ socket.io.js:9017.xhr.request @ socket.io.js:9017.xhr.dopoll @ socket.io.js:9018.polling.poll @ socket.io.js:10718.polling.ondata @ socket.io.js:109(anonymous function) @ socket.io.js:909.emitter.emit @ socket.io.js:3517.request.ondata @ socket.io.js:9617.request.onload @ socket.io.js:10217.request.create.xhr.onreadystatechange @ socket.io.js:94 chat.js.php:204 error: xhr poll error     @ xhr.14.transport.onerror socket.io.js:9017.xhr.request @ socket.io.js:9017.xhr.dowrite @ socket.io.js:90(anonymous function) @ socket.io.js:110(anonymous function) @ socket.io.js:183proxy @ socket.io.js:218(anonymous function) @ socket.io.js:183(anonymous function) @ socket.io.js:18225.exports.encodepacket @   

i tried use pm2 module not help.

any idea on how fix ?

cluster module doesn't play socket.io 1.x

https://github.com/unitech/pm2/issues/637


Comments