overmind icon indicating copy to clipboard operation
overmind copied to clipboard

feature request: OVERMIND_AUTO_RESTART_INTERVAL

Open jackie-pc opened this issue 1 year ago • 0 comments

The desired logic would be:

  • Unset: overmind restarts processes immediately
  • OVERMIND_AUTO_RESTART_INTERVAL=5. Before auto-restarting a process, wait 5 seconds.
  • `OVERMIND_AUTO_RESTART=A:2,B:7. Before restarting A, wait 2 seconds. Before restarting B, wait 7 seconds.

These wait times do NOT apply to the very first start of processes.

Does this sound like a reasonable feature to have?

Would the project accept PRs for this?

A bit more on my immediate use case:

We use overmind as part of a PaaS offering. We gather logs from stdout/stderr streams of user defined services. These processes are managed with Overmind. We do OVERMIND_AUTO_RESTART (in case things are retryable.... like slow OOMs). But sometimes user code enters tight crash loop. We want to make that crash loop less tight. E.g. may be user's code is using up some expensive resource on startup, or the crashing stacktrace prints are logging too much stuff for our log store, etc.

We could implement it as some wrapper run_with_retries.sh around the user's code. But wanted to check with Overmind project to see if there would be interest in this.

jackie-pc avatar Dec 15 '23 16:12 jackie-pc