@coco 这个参数叫什么名字 我查一下
Posts made by Bright
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",
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)