我有一些带有少量RAM的DigitalOcean小滴,我正在用python编写脚本并使用pm2运行此脚本,就像我们正常运行node.js脚本一样,但是一段时间后,错误显示如下。
我这样做:
pm2启动script.sh
该应用程序无法启动,我在日志中重复此操作:
root @ ubuntu-s-photomaths:/ var / www / html / sym_math#pm2日志
**[TAILING] Tailing last 15 lines for [all] processes (change the value with --lines option)
/root/.pm2/pm2.log last 15 lines:**
PM2 | 2019-12-11T04:29:23: PM2 log: App [script:0] online
PM2 | 2019-12-11T04:29:23: PM2 log: App [script:0] exited with code [0] via signal [SIGINT]
PM2 | 2019-12-11T04:29:23: PM2 log: App [script:0] starting in -fork mode-
PM2 | 2019-12-11T04:29:23: PM2 log: App [script:0] online
PM2 | 2019-12-11T04:29:24: PM2 log: App [script:0] exited with code [0] via signal [SIGINT]
PM2 | 2019-12-11T04:29:24: PM2 log: App [script:0] starting in -fork mode-
PM2 | 2019-12-11T04:29:24: PM2 log: App [script:0] online
PM2 | 2019-12-11T04:29:25: PM2 log: App [script:0] exited with code [0] via signal [SIGINT]
PM2 | 2019-12-11T04:29:25: PM2 log: App [script:0] starting in -fork mode-
PM2 | 2019-12-11T04:29:25: PM2 log: App [script:0] online
PM2 | 2019-12-11T04:29:26: PM2 log: App [script:0] exited with code [0] via signal [SIGINT]
PM2 | 2019-12-11T04:29:26: PM2 log: App [script:0] starting in -fork mode-
PM2 | 2019-12-11T04:29:26: PM2 log: App [script:0] online
PM2 | 2019-12-11T04:29:26: PM2 log: App [script:0] exited with code [0] via signal [SIGINT]
PM2 | 2019-12-11T04:29:26: PM2 log: Script /var/www/html/sym_math/script.sh had too many unstable restarts (16). Stopped. "errored"
****]
我的错误日志可以这样显示
/root/.pm2/logs/script-error.log last 15 lines:
0|script |
0|script | Usage:
0|script | kill [options] <pid> [...]
0|script |
0|script | Options:
0|script | <pid> [...] send signal to every <pid> listed
0|script | -<signal>, -s, --signal <signal>
0|script | specify the <signal> to be sent
0|script | -l, --list=[<signal>] list all signal names, or convert one to a name
0|script | -L, --table list all signal names in a nice table
0|script |
0|script | -h, --help display this help and exit
0|script | -V, --version output version information and exit
0|script |
0|script | For more details see kill(1).
有人可以帮我吗