Uploaded image for project: 'Commons Daemon'
  1. Commons Daemon
  2. DAEMON-334

Specify a maximum limit for automatic restarts

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 1.0.15
    • 1.1.0
    • Jsvc
    • Unix / Linux systems

    • Patch

    Description

      Our particular use-case requires that JSVC not automatically restart the daemon if the child process throws a fatal error (e.g. OutOfMemoryError - resulting in a dead daemon) or similarly the JVM aborts (bug etc.).

      In any case the attached patch goes slightly further and provides a '-restarts n' option which can be set to:
      -1 (infinite, also the default and mirrors existing behaviour)
      0 (one-shot mode) up to (MAX_INT-1) fixed restart count and specific to the platform.

      The patch is just an example of how it could be done.
      Note that the intention here is to limit the restart count for successive fatal errors - not for controlled restarts initiated by the administrator via a signal, which actually resets the counter

      Attachments

        1. 01-control-automatic-restarts.patch
          5 kB
          Brett Delle Grazie

        Activity

          People

            Unassigned Unassigned
            brett.dellegrazie Brett Delle Grazie
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: