关于PM2的几个问题
发布于 9 年前 作者 wizali 6853 次浏览 最后一次编辑是 8 年前 来自 问答

之前没有注意这个问题,直到我查看了这个日志以后才发现一堆红色,请教一下这是怎么回事啊? 另外,我发现用PM2启动以后,除了logs不停的闪下面的内容,内存消耗也非常快,怎么回事呢? 还有一个问题,为什么我-i max启动两个进程以后,总有一个死了活,活了又死?

baom1-0 Error: listen EADDRINUSE :::3002
baom1-0     at Object.exports._errnoException (util.js:856:11)
baom1-0     at exports._exceptionWithHostPort (util.js:879:20)
baom1-0     at Server._listen2 (net.js:1238:14)
baom1-0     at listen (net.js:1274:10)
baom1-0     at Server.listen (net.js:1370:5)
baom1-0     at EventEmitter.app.listen (/root/project/baom1/node_modules/express/lib/application.js:595:24)
baom1-0     at Object.<anonymous> (/root/project/baom1/app.js:120:18)
baom1-0     at Module._compile (module.js:399:26)
baom1-0     at Object.Module._extensions..js (module.js:406:10)
baom1-0     at Module.load (module.js:345:32)
baom1-0     at Function.Module._load (module.js:302:12)
baom1-0     at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
baom1-0     at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:36:21)
baom1-0     at Module._compile (module.js:399:26)
baom1-0     at Object.Module._extensions..js (module.js:406:10)
baom1-0     at Module.load (module.js:345:32)
PM2 App [baom1] with id [0] and pid [30138], exited with code [255] via signal [null]
PM2 Starting execution sequence in -fork mode- for app name:baom1 id:0
PM2 App name:baom1 id:0 online
PM2 Change detected on path nohup.out for app baom1 - restarting
PM2 Stopping app:baom1 id:0
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
PM2 Process with pid 30163 still not killed, retrying...
baom1-0 Error: listen EADDRINUSE :::3002
baom1-0     at Object.exports._errnoException (util.js:856:11)
baom1-0     at exports._exceptionWithHostPort (util.js:879:20)
baom1-0     at Server._listen2 (net.js:1238:14)
baom1-0     at listen (net.js:1274:10)
baom1-0     at Server.listen (net.js:1370:5)
baom1-0     at EventEmitter.app.listen (/root/project/baom1/node_modules/express/lib/application.js:595:24)
baom1-0     at Object.<anonymous> (/root/project/baom1/app.js:120:18)
baom1-0     at Module._compile (module.js:399:26)
baom1-0     at Object.Module._extensions..js (module.js:406:10)
baom1-0     at Module.load (module.js:345:32)
baom1-0     at Function.Module._load (module.js:302:12)
baom1-0     at Function._load (/usr/local/lib/node_modules/pm2/node_modules/pmx/lib/transaction.js:62:21)
baom1-0     at Object.<anonymous> (/usr/local/lib/node_modules/pm2/lib/ProcessContainerFork.js:36:21)
baom1-0     at Module._compile (module.js:399:26)
baom1-0     at Object.Module._extensions..js (module.js:406:10)
baom1-0     at Module.load (module.js:345:32)
PM2 App [baom1] with id [0] and pid [30163], exited with code [255] via signal [null]
PM2 Starting execution sequence in -fork mode- for app name:baom1 id:0
PM2 App name:baom1 id:0 online
1 回复

有个进程占用了 3002 port 看看是什么 kill -9 xxxxx 干掉他 然后 pm2 restart

回到顶部