2014-08-30 70 views
3

我在heroku上有一个应用程序,它使用socket.io进行服务器 - 客户端通信。一切都很好。但是,一旦我扩展我的应用程序超过1条赛道,我得到几个HTTP请求错误:在多节点上部署socket.io应用程序

can't establish a connection to the server at wss://***/socket.io/?EIO=2&transport=websocket&sid=Hky6IHdckNADdU_tAACm. socket.io.js:4520 The connection to wss://***/socket.io/?EIO=2&transport=websocket&sid=Hky6IHdckNADdU_tAACm was interrupted while the page was loading. socket.io.js:4520 can't establish a connection to the server at wss://***/socket.io/?EIO=2&transport=websocket&sid=kWymv6ItJHBcUybZAAAA. socket.io.js:4520 The connection to wss://***/socket.io/?EIO=2&transport=websocket&sid=kWymv6ItJHBcUybZAAAA was interrupted while the page was loading. socket.io.js:4520

以及我socket.io使用Redis的适配器的 HTTP status 400 { code: 1, message: "Session ID unknown" }

负荷,所以应该正确地共享状态。我种验证了这一点通过连接到Redis的,并发出以下命令: PSUBSCRIBE socket.io#*

因为我可以看到数据回到过去并强制该通道上,我假设我socket.io Redis的适配器工作正常。

任何人都知道如何使socket.io在超过1个动态的heroku上工作?

回答

相关问题