我有一個pm2的問題。 我開始JSON是使用sailsjs重啓pm2循環
{
"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重新啓動。有任何想法嗎?
是否有任何日誌文件寫入同一文件夾?嘗試知道哪些文件正在更改並將它們添加到'ignoreWatch'屬性 – Unitech 2015-02-23 23:33:09
請注意,Sails在生產環境中運行時也會創建一個* www *文件夾...您可能還想將其添加到忽略列表中。 – 2015-02-26 08:19:03