40

I am using forever with my project. What do these options do:

  • minUptime
  • spinSleepTime

I didn't understand from GitHub page.

Dan Dascalescu
  • 127,343
  • 44
  • 300
  • 387
Tolgay Toklar
  • 3,732
  • 8
  • 38
  • 63

1 Answers1

66

Forever's documentation explains each briefly:

--minUptime      Minimum uptime (millis) for a script to not be considered "spinning"
--spinSleepTime  Time to wait (millis) between launches of a spinning script.

A "spinning" application is one that keeps failing/crashing shortly after a restart.

--minUptime sets the minimum amount of time that an application is expected to run. If it crashes before that limit, it's considered to be "spinning" or problematic.

--spinSleepTime sets an amount of time that forever will wait before trying to restart a "spinning" application again.

Collectively, they help prevent having an application rapidly being restarted only to crash each time.

Jonathan Lonowski
  • 117,332
  • 31
  • 195
  • 197
  • Thank you,this is helpful :) – Tolgay Toklar Aug 22 '13 at 21:31
  • 4
    Is there a way to prevent the app from being restarted at all, and/or report that it has crashed too many times? There's a `-m` option, but it doesn't distinguish between spinning crashes and crashes after the application has launched properly. – Dan Dascalescu Mar 07 '14 at 00:56