Supervisor / supervisor

Supervisor process control system for Unix (supervisord)
http://supervisord.org
Other
8.46k stars 1.24k forks source link

add maxbackoff to limit the interval between retries #1529

Open jseparovic opened 2 years ago

mnaberez commented 2 years ago

https://github.com/Supervisor/supervisor/issues/1528#issue-1312175658

When using supervisord to restart a process that is exiting upon start, it seems the backoff procedure just adds 1 second to the backoff forever. Is it possible to add a config option such as maxbackoff=30 or similar so that we can force a restart attempt at least every 30 seconds even when the process it not starting continually. It might be some external system that needs to be fixed in order for the process to start and this could take some time, but supervisor should keep retrying so the process comes back up in a timely manner when the external system is fixed. If the external system is down for a day

Would like to use something like: autorestart=true startretries=2147483647 maxbackoff=30

So that supervisor will retry at least every 30 seconds.

warrenspence commented 9 months ago

I think this config option makes sense and I'd like to use it myself.

An issue with the PR is that you've set the default to 60 seconds which is effectively changing the existing behaviour for users currently providing a large startretries value.

I think if you set the default to 0 and then in supervisor/process.py only enforce the limit check if the maxbackoff is non 0 then the change would be safe to merge.