NetEase / pomelo

A fast,scalable,distributed game server framework for Node.js.
http://pomelo.netease.com
MIT License
11.87k stars 2.9k forks source link

rpc callback timeout #1023

Open jie6121565 opened 6 years ago

jie6121565 commented 6 years ago

服务器每隔几个小时会 rpc调用超时,导致没法继续发送消息;

报错: [2018-04-25 19:47:06.403] [ERROR] pomelo-rpc - [mqtt-mailbox] rpc connector-server-1 callback timeout 30000, remote server 86 host: 192.168.6.134, port: 5200

[2018-04-25 19:47:06.403] [ERROR] pomelo-rpc - [MailStation] [pomelo-rpc] fail to send message Error: rpc connector-server-1 callback timeout 30000, remote server 86 host: 192.168.6.134, port: 5200 at null. (E:\NPH2_50king_project\first_project_nph2\myserver\game-server\node_modules\pomelo-rpc\lib\rpc-client\mailboxes\mqtt-mailbox.js:257:16) at Timer.listOnTimeout (timers.js:92:15)

下面是用pomelo-cli 查询的当时服务器数据 admin@pomelo : all>show servers

serverId serverType host port pid heapUsed(M) uptime(m) connector-server-1 connector 192.168.6.134 5100 9512 28.35 110.09 game-server-1 game 192.168.6.134 5300 9540 29.61 110.08 gate-server-1 gate 192.168.6.134 5000 8388 29.08 110.08 hall-server-1 hall 192.168.6.134 5200 10236 26.78 110.08 master-server-1 master 127.0.0.1 3005 4820 22.22 110.10

有人知道为什么吗?谢谢

whtiehack commented 6 years ago

换用别的rpc协议试试

wangluo1 commented 6 years ago

我的也是 , 过一段时间,就会调用超时 "connector.entryHandler.entry" timeout.

有人知道为什么吗?谢谢

Jamy325 commented 6 years ago

检查一下 192.168.6.134:5200 1.是不是没有及时调用rpc的callback, 2.是不是进程卡死了(cpu某一核占用率100%)

wangluo1 commented 6 years ago

还是没有解决,过一夜,第二天就不行了,请求超时

] [connector-server-1] handleMessage session id: 5, msg: {"id":2,"type":0,"compressRoute":1,"route":"connector.entry2048Handler.entry","body":{"userid":1819},"compressGzip":0} [2018-05-02 10:06:12.896] [INFO] pomelo - msg[object Object] [2018-05-02 10:06:12.896] [DEBUG] pomelo - [/data/ufoserver/PomeloGame/game-server/node_modules/pomelo/lib/components/connector.js] session on [connector-server-1] bind with uid: 1819 [2018-05-02 10:06:15.899] [ERROR] pomelo - [/data/ufoserver/PomeloGame/game-server/node_modules/pomelo/lib/filters/handler/timeout.js] request "connector.entry2048Handler.entry" timeout.

yangfch3 commented 6 years ago

同 #1026

hj3938 commented 6 years ago

1026