简体   繁体   English

使用PM2时,Swagger管理的Node.js服务器崩溃

[英]Swagger managed nodejs server crashing when using PM2

I created my node js server using swagger via: 我使用swagger通过以下方式创建了节点js服务器:

swagger project create <project-name>

But when I'm trying to launch the server using pm2 as follows: 但是,当我尝试使用pm2启动服务器时,如下所示:

pm2 start app.js

it's crashing because of too many unstable restarts. 由于太多不稳定的重启而崩溃。 Below is the error message: 下面是错误消息:

Script /path/to/app.js had too many unstable restarts (16). 脚本/path/to/app.js有太多不稳定的重启(16)。 Stopped. 停了 "errored" “错了”

Its a known issue and it can be fixed if we change the FD0 pipe in ForkMode from "ipc" to "ignore". 如果我们将ForkMode中的FD0管道从“ ipc”更改为“ ignore”,则可以解决此问题。 For more details please refer to this issue thread on github: PM2 crashes due to many unstable restarts 有关更多详细信息,请参阅github上的该问题线程: 由于许多不稳定的重启,PM2崩溃

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM