node.js - Socket.io connection with transport=polling is failing in one off cases -


i using socket io koa. nginx load balancer.

if not wrong, socket.io starts transport=polling , subsequently socket connection upgraded websocket connection.

most of socket.io users repeat visitors, long return force new connection passing

io.connect("url", {forcenew: true}) 

this approach works fine in majority of cases.

but in specific cases nginx reverse proxy reports cannot connect socket io with

2017/xx/xx 11:26:20 [error] 21340#21340: *xxxx212 connect() failed (111: connection refused) while connecting upstream, client: 32.xx.xx.314, server: webosocket.localhost,com request: "get /socket.io/?eio=3&transport=polling&t=xxxxxxxxxxxxx-29094 http/2.0", upstream: "http://127.0.0.1:1200/socket.io/?eio=3&transport=polling&t=xxxxxxxxxxxxx-29094", host: "webosocket.localhost,com", referrer: "http://localhost:8181/"

is there way debug why transport=polling failing in cases, not in majority of cases?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -