加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

supervisord autorestart max尝试?

发布时间:2020-12-13 23:28:07 所属栏目:Linux 来源:网络整理
导读:http://supervisord.org/configuration.html#program-x-section-values表示你可以使用autorestart = true在退出时重新启动,但是没有说明如何在放弃之前给出最大量的重启(在startsecs内).有没有办法做到这一点?注意:我不是在谈论第一次启动,而是关于程序崩
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

最好的祝福

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读