pm2循环使用sailsjs重新启动

时间:2015-02-11 12:09:03

标签: node.js sails.js pm2

我对pm2有疑问。 我的开始json是

{
"apps" : [{
    "name"        : "sails",
    "script"      : "app.js",
    "log_date_format"  : "DD-MM-YYYY HH:mm Z",
    "ignoreWatch" : ["[\\/\\\\]\\./", "node_modules", ".tmp", "views", "assets", ".idea"],
    "watch"       : true
}]
}

然后我做

pm2 start dev.json

PM2通过此消息进入无限重启

PM2: 2015-02-11 14:56:39: Change detected for app name: sails - restarting
PM2: 2015-02-11 14:56:39: Process with pid 5766 still not killed, retrying...
PM2: 2015-02-11 14:56:39: App closed with code: 0
PM2: 2015-02-11 14:56:39: App name:sails id:0 exited
PM2: 2015-02-11 14:56:40: Process with pid 5766 killed
PM2: 2015-02-11 14:56:40: Starting execution sequence in -fork mode- for app name:sails id:0
PM2: 2015-02-11 14:56:40: App name:sails id:0 online

但没有文件被更改。在sails注销调试消息后,似乎PM2重新启动。有什么想法吗?

2 个答案:

答案 0 :(得分:0)

我通过将PM2版本frpm 0.12.5切换到0.11

解决了这个问题

答案 1 :(得分:0)

我有类似的问题。安装3天前发布的最新版本,0.12.7并查看issue 969链接中的信息是否可以帮助您解决问题。

https://github.com/Unitech/PM2/issues/969