Return-Path: X-Original-To: apmail-commons-issues-archive@minotaur.apache.org Delivered-To: apmail-commons-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5BDAD1756A for ; Wed, 3 Jun 2015 21:50:38 +0000 (UTC) Received: (qmail 87290 invoked by uid 500); 3 Jun 2015 21:50:38 -0000 Delivered-To: apmail-commons-issues-archive@commons.apache.org Received: (qmail 87199 invoked by uid 500); 3 Jun 2015 21:50:38 -0000 Mailing-List: contact issues-help@commons.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: issues@commons.apache.org Delivered-To: mailing list issues@commons.apache.org Received: (qmail 87186 invoked by uid 99); 3 Jun 2015 21:50:38 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 03 Jun 2015 21:50:38 +0000 Date: Wed, 3 Jun 2015 21:50:38 +0000 (UTC) From: "Brett Delle Grazie (JIRA)" To: issues@commons.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (DAEMON-334) Specify a maximum limit for automatic restarts MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/DAEMON-334?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Brett Delle Grazie updated DAEMON-334: -------------------------------------- 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 was: 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. > Specify a maximum limit for automatic restarts > ---------------------------------------------- > > Key: DAEMON-334 > URL: https://issues.apache.org/jira/browse/DAEMON-334 > Project: Commons Daemon > Issue Type: Improvement > Components: Jsvc > Affects Versions: 1.0.16 > Environment: Unix / Linux systems > Reporter: Brett Delle Grazie > Priority: Minor > Labels: newbie, patch > Attachments: 01-control-automatic-restarts.patch > > > 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 -- This message was sent by Atlassian JIRA (v6.3.4#6332)