supervisord autorestart max尝试?

http://supervisord.org/configuration.html#program-x-section-values表示你可以使用autorestart = true在退出时重新启动,但是没有说明如何在放弃之前给出最大量的重启(在startsecs内).有没有办法做到这一点?注意:我不是在谈论第一次启动,而是关于程序崩溃的事件,比如,运行10天.

根据文档,autorestart不关心startretries:

autorestart controls whether supervisord will autorestart a program if
it exits after it has successfully started up (the process is in the
RUNNING state).

supervisord has a different restart mechanism for when the process is
starting up (the process is in the STARTING state). Retries during
process startup are controlled by startsecs and startretries.

最佳答案 我认为你需要的是使用startretries参数..

http://supervisord.org/configuration.html?highlight=startretries#program-x-section-example

最好的祝福

点赞