[C]pm2 + @colyseus/proxy Has been Error: socket hang up who can help me?

Error: socket hang up
1|proxy | at createHangUpError (_http_client.js:332:15)
1|proxy | at Socket.socketCloseListener (_http_client.js:373:25)
1|proxy | at Socket.emit (events.js:203:15)
1|proxy | at Socket.EventEmitter.emit (domain.js:448:20)
1|proxy | at TCP._handle.close (net.js:607:12)
1|proxy | Proxy error during: /matchmake/joinById/HiYt0Y_8o
1|proxy | Error: socket hang up
1|proxy | at createHangUpError (_http_client.js:332:15)
1|proxy | at Socket.socketCloseListener (_http_client.js:373:25)
1|proxy | at Socket.emit (events.js:203:15)
1|proxy | at Socket.EventEmitter.emit (domain.js:448:20)
1|proxy | at TCP._handle.close (net.js:607:12)

你好,这个问题在我看来有2种可能,
1,服务器里有一个用于拥塞大小调整的参数,这个参数没设置好;
2,线路问题导致连接阻塞。
我马上反馈给技术人员,得到更专业的答案后会立即回复!

@bright 如果你使用 Discord 等交流软件,可以加入 https://discord.gg/swqumk9U
请问你使用的是自托管服务器还是 Arena 服务器?

Hi @Bright, can you share more details about your environment?

  • Are you using PM2? How's your ecosystem config file?
  • Which Presence and Driver have you configured on your Colyseus server?
  • Which version of the proxy and Colyseus are you using?

If you can share the relevant pieces of source code it would be best. Cheers!

Yes using PM2
ecosystem.js content:

//******************************************************************//
const os = require('os');
module.exports = {
    error_file: 'logs/err.log',
    out_file: 'logs/out.log',
    log_file: 'logs/combined.log',
    time: true,
    apps: [
        {
            name        : "game",
            script      : "cd game &&  node dist/main.js",
            watch       : true,
            instances   : os.cpus().length,
            exec_mode   : 'fork',
			env: {
				PORT:xxxx, //proxy port
                DEBUG: "colyseus:errors",
                NODE_ENV: "production"
            }
		},
        {
            name        : "proxy",
			script      : "cd proxy/proxy  && npx ts-node proxy.ts",
            //script      : "cd proxy && node proxy.js",
            watch       : true,
            instances   : 1,
            exec_mode   : 'fork',
			env: {
				PORT: xxxx,
				IP:"10.70.28.139",
				REDIS_URL: "redis://xx.xx.xx.xx:2007/01",
                NODE_ENV: "production"
            }
        }
    ]
}
//******************************************************************//

Version number of Colyseus I use:

"Colyseus" : "^ 0.12.3",
"Colyseus. Js", "^ 0.13.1",
"@ colyseus/proxy", "0.12.6",

@coco 自托管

@coco 这个参数叫什么名字 我查一下