pomelo icon indicating copy to clipboard operation
pomelo copied to clipboard

heartbeat timeout in firefox

Open ninggf opened this issue 7 years ago • 1 comments

OS: mac os Firefox Version: 53.0 (64-bit) pomelo Version: 2.2.5

在Firfox中运行chat示例时,heartbeat会超时,pomelo日志如下:

[2017-04-28 17:38:16.916] [INFO] pomelo - [/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo/lib/connectors/commands/heartbeat.js] client 7 heartbeat timeout.

[2017-04-28 17:38:16.916] [DEBUG] pomelo - [/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo/lib/common/service/sessionService.js] session on [connector-server-3] is closed with session id: 7

[2017-04-28 17:38:16.918] [DEBUG] pomelo - [/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo/lib/common/service/channelService.js] [chat-server-3] channelService sendMessageByGroup route: onLeave, msg: {"route":"onLeave","user":"bill"}, groups: {"connector-server-1":["leo*1"]}, opts: undefined

[2017-04-28 17:38:16.922] [DEBUG] pomelo - [/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo/lib/common/remote/frontend/channelRemote.js] [connector-server-1] pushMessage uids: ["leo*1"], msg: {"route":"onLeave","user":"bill"}, sids: [2] [2017-04-28 17:38:16.922] [DEBUG] pomelo - [/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo/lib/components/connector.js] [connector-server-1] send message reqId: null, route: onLeave, msg: {"route":"onLeave","user":"bill"}, receivers: [2], opts: {"type":"push","userOptions":{},"isPush":true}

[2017-04-28 17:38:46.917] [ERROR] pomelo-rpc - [mqtt-mailbox] rpc connector-server-3 callback timeout 30000, remote server 24 host: 127.0.0.1, port: 6052

[2017-04-28 17:38:46.917] [ERROR] pomelo-rpc - [MailStation] [pomelo-rpc] fail to send message Error: rpc connector-server-3 callback timeout 30000, remote server 24 host: 127.0.0.1, port: 6052 at Timeout. (/Users/leo/Github/test/chatofpomelo-websocket/game-server/node_modules/pomelo-rpc/lib/rpc-client/mailboxes/mqtt-mailbox.js:257:16) at ontimeout (timers.js:386:14) at tryOnTimeout (timers.js:250:5) at Timer.listOnTimeout (timers.js:214:5)

[2017-04-28 17:38:46.917] [ERROR] pomelo-rpc - [failprocess] rpc failed with error, remote server: chat-server-3, msg: {"namespace":"user","serverType":"chat","service":"chatRemote","method":"kick","args":["bill*1","connector-server-3","1"]}, error code: 5

ninggf avatar Apr 28 '17 09:04 ninggf

服务端app.js中把配置参数heartbeat的值改大点就好了。。。 app.configure('production|development', 'connector', function(){ app.set('connectorConfig', { connector : pomelo.connectors.hybridconnector, heartbeat : 300, // closeTimeout : 60, // heartbeatTimeout : 60, // heartbeatInterval : 25, disconnectOnTimeout: true,

    // enable useDict will make route to be compressed
    useDict: true,

    // enable useProto
    useProtobuf: true
});

});

zhaoguo20002 avatar Dec 13 '17 10:12 zhaoguo20002