以下是我当前的监督配置。我遇到了一个问题,有时该过程之一是myapp2
将挂起几分钟。我以为使用stopwaitsecs
会杀死所有超过5分钟的工作,但事实并非如此。如果花费的时间超过x
分钟,是否可以让主管监督杀死/终止工作?
[group:myapp]
programs=myapp1,myapp2
[program:myapp1]
command=bash -c "sleep 20 && exec /usr/local/bin/myapp --hash=2382391"
numprocs=1
numprocs_start=1
autostart=true
autorestart=true
stderr_logfile=/var/log/log.err.log
stdout_logfile=/var/log/log.out.log
stopwaitsecs=300
startretries=3
[program:myapp2]
command=bash -c "sleep 20 && exec /usr/local/bin/myapp --hash=00997123"
numprocs=1
numprocs_start=1
autostart=true
autorestart=true
stderr_logfile=/var/log/log.err.log
stdout_logfile=/var/log/log.out.log
stopwaitsecs=300
startretries=3