2014-08-30 105 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上工作?

回答

相關問題