Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a cooldownInterval option #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Commits on Feb 10, 2016

  1. Add a cooldownInterval options

    When monitoring a script, it's handy to limit the maximum number of
    restart. But it's not the same if the script fails 10 times in 10
    seconds and 10 times in 10 weeks. On the first case, there is probably
    an hard error and it's better to stop soon trying to restart this
    script. But on the second case, a max of 10 is not enough. Maybe it's
    just a crontab running once a week that makes it fail.
    
    The cooldownInterval is here to make max time sensitive. Forever-monitor
    keeps a counter with the number of failures of the script. When this
    counter reaches the max, it stops trying to restart it. With
    cooldownInterval, this counter is halfed at a regular interval defined
    by the number of seconds of cooldownInterval.
    
    For example, with cooldownInterval=300, if the counter is at 4 failures
    and in the next 5 minutes, the script won't fail, it will go to 2. And
    if the next 5 following minutes, it still run quiet, it will go to 1.
    And 5 more minutes, and will be reset to 0.
    nono committed Feb 10, 2016
    Configuration menu
    Copy the full SHA
    9a2e9fd View commit details
    Browse the repository at this point in the history