indexzero/forever — Issue #153: safe time
Author: dominictarr
Created: 2011-11-02 10:12:59+00:00
State: open

if a process falls of it's bike straight away, in less than a second then there is probably something seriously wrong and restarting is not the answer. for example, I just found this:

``` bash
root@server:~# forever list
info: Running action: list
info: Forever processes running
data: uid command script forever pid logfile uptime
data: [0] 3uMd node [oaebkrbrpbrocbkrobkbaoprkocbpkrcboprkborpckbkpror] 29609 14396 /root/.forever/kQqe.log 0:5:33:37.782
data: [1] nkR5 node / 29462 30741 /root/.forever/nkR5.log 0:0:0:0.21
```

now, it's restarting the node / command over and over... clearly that command was an accident, but it's now trashing the OS...
if the start process waited 1 second to see if the process fall over before putting it into safe mode... that avoid problems like this.

another way... would be to disable restarting when, say the port is bound.
(of course, not all processes are servers, but that would be a handy option -- and I already have some code for detecting the ports from the outside over in haibu)

that is probably overkill for now, but Monitor should have a saftey switch for activating restart only after the dust has cleared, so to speak.