Seb*_*bin 4 azure node.js coffeescript express pm2
我在Azure服务器上部署了一个express.js应用程序.我使用pm2进行流程管理.
问题是pm2几乎每秒都会重启.
staging@Server:/srv/apps/myapp/current$ pm2 list
?????????????????????????????????????????????????????????????????????????????????????
? App name ? id ? mode ? pid ? status ? restart ? uptime ? memory ? watching ?
?????????????????????????????????????????????????????????????????????????????????????
? app ? 0 ? fork ? 35428 ? online ? 0 ? 0s ? 20.465 MB ? disabled ?
?????????????????????????????????????????????????????????????????????????????????????
Use `pm2 show <id|name>` to get more details about an app
staging@Server:/srv/apps/myapp/current$ pm2 list
?????????????????????????????????????????????????????????????????????????????????????
? App name ? id ? mode ? pid ? status ? restart ? uptime ? memory ? watching ?
?????????????????????????????????????????????????????????????????????????????????????
? app ? 0 ? fork ? 35492 ? online ? 7 ? 0s ? 59.832 MB ? disabled ?
?????????????????????????????????????????????????????????????????????????????????????
Use `pm2 show <id|name>` to get more details about an app
staging@Server:/srv/apps/myapp/current$ pm2 list
?????????????????????????????????????????????????????????????????????????????????????
? App name ? id ? mode ? pid ? status ? restart ? uptime ? memory ? watching ?
?????????????????????????????????????????????????????????????????????????????????????
? app ? 0 ? fork ? 35557 ? online ? 13 ? 0s ? 21.816 MB ? disabled ?
?????????????????????????????????????????????????????????????????????????????????????
Run Code Online (Sandbox Code Playgroud)
〜/ .pm2/pm2.log
2016-05-10 17:39:34: Starting execution sequence in -fork mode- for app name:start id:0
2016-05-10 17:39:34: App name:start id:0 online
2016-05-10 17:39:35: App [start] with id [0] and pid [3149], exited with code [255] via signal [SIGINT]
2016-05-10 17:39:35: Starting execution sequence in -fork mode- for app name:start id:0
2016-05-10 17:39:35: App name:start id:0 online
2016-05-10 17:39:35: App [start] with id [0] and pid [3158], exited with code [255] via signal [SIGINT]
2016-05-10 17:39:35: Starting execution sequence in -fork mode- for app name:start id:0
2016-05-10 17:39:35: App name:start id:0 online
2016-05-10 17:39:36: App [start] with id [0] and pid [3175], exited with code [255] via signal [SIGINT]
2016-05-10 17:39:36: Starting execution sequence in -fork mode- for app name:start id:0
Run Code Online (Sandbox Code Playgroud)
我在我的应用程序中使用咖啡脚本.并使用启动应用程序pm2 start app.coffee
的package.json
{
"name": "myapp",
"version": "0.0.0",
"private": true,
"scripts": {
"start": "gulp start-server"
},
"dependencies": {
"bcrypt-nodejs": "0.0.3",
"body-parser": "~1.13.2",
"co": "^4.6.0",
"coffee-script": "^1.10.0",
"connect-mongo": "^1.1.0",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"express": "~4.13.1",
"express-session": "^1.13.0",
"gulp": "^3.9.1",
"mongoose": "^4.4.14",
"morgan": "~1.6.1",
"newrelic": "^1.26.2",
"passport": "^0.3.2",
"passport-local": "^1.0.0",
"pm2": "^1.1.3",
"pug": "^2.0.0-alpha6",
"request": "^2.72.0",
"serve-favicon": "~2.3.0"
},
"devDependencies": {
"shipit-cli": "^1.4.1",
"shipit-deploy": "^2.1.3",
"shipit-npm": "^0.2.0",
"shipit-pm2-nginx": "^0.1.8"
}
}
Run Code Online (Sandbox Code Playgroud)
我是node.js的新手.可能是我没有看到明显的.请帮帮我.
日志对于理解问题没有用.
要了解故障并继续前进,您应该尝试在遥控器上手动启动应用程序.
IE类型npm run start或类似的东西node path/yo/your/bin.js
它应该为您提供缺失的信息来解决问题并继续前进.
| 归档时间: |
|
| 查看次数: |
7759 次 |
| 最近记录: |