uditalias / swamp

Swamp is a tool for running, managing and monitoring processes. jump in!
MIT License
14 stars 3 forks source link

Correctly handling node.js processes failing to startu #12

Closed alonisser closed 10 years ago

alonisser commented 10 years ago

The current situtation: When one of the node processes fails to start: unhandled exception, port error, etc. then It just tries to restart over and over again. overloading the cpu (100% sometimes) and failing to alert the user, until I notice something is broken (usually at login). handling: Swamp should detect this situation, notify the user of failure. and also have a growing lapses between trying to start a service, Ending with a clear failure. (for example. 1sec. 3, sec, 5, sec 10, sec , 15, sec. 20 sec - failure)

uditalias commented 10 years ago

@alonisser see the minRuntime option of a service, is it helps to this kind of situations?

options.minRuntime The minimum runtime (in milliseconds) for the service before running it again after error

Try to increase the minRuntime (default is 1000) and if the service will fail before the minRuntime, then he wont run again and again...

alonisser commented 10 years ago

@uditalias I think for starters It's ok. but most tools of this kind have an option for growing lapses