supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Lars Kellogg-Stedman <lars@oddbit.com>
Subject: Re: Respawn limit for runsv?
Date: Sat, 12 Feb 2005 08:04:59 -0500	[thread overview]
Message-ID: <lars-D190CB.08045912022005@sea.gmane.org> (raw)
In-Reply-To: <pan.2005.02.12.05.21.19.402644@spamcop.net>

> > There is no general class of problem unless you can provide a single
> > instance.

Seriously, I would like to live in your perfect world, but in the past 
couple of decades I've seen a variety of situations that would have been 
easier to deal with (or that, in fact, *were* easier to deal with) 
because of a limiter.  Let's make up some examples:

- A piece of hardware on which a program depends goes bad, causing the 
program to exit immediately upon startup.  Suppose that this program has 
a high initial startup cost -- so not only is it respawning pointlessly, 
but it's driving up system load.

- The disk fills up, causing your X startup to fail.  But because of the 
continuous respawning, you can't log in on the console!

- A program bug causes a crash and concomitant database corruption.  
Subsequent startups fail immediately, but since you're logging through 
svlogd, the original crash messages disappears into the ether because 
the roughly 3600 respawns/hour have pushed it out of the logs.

- Or in any of the above scenarios, maybe you're *not* logging through 
svlogd, and the error messages fill up a partition and bring the system 
to a screeching halt, or at least give it a noticeable limp.

Sure, yes, the root problem here is not unlimited respawning, but this 
behavior exacerbates the problem.  Diagnosis and resource consumption 
are both aided by some sort of limit.

Exponential back-off would probably be just fine, and represents a 
fairly common solution to this class of problem.  SysV init simply 
pauses for a few minutes if the respawn rate exceeds a certain 
threshold, and then tries again.

Either behavior would be helpful.  If you've never encountered a 
situation in which this would be useful, then by all means, don't 
partake of whatever, if anything, I ultimately manage to produce.



  reply	other threads:[~2005-02-12 13:04 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-02-11 12:56 Lars Kellogg-Stedman
2005-02-12  0:14 ` Charlie Brady
2005-02-12  1:14   ` Lars Kellogg-Stedman
2005-02-12  3:13     ` Charlie Brady
2005-02-12  5:21       ` Charles Duffy
2005-02-12 13:04         ` Lars Kellogg-Stedman [this message]
2005-02-13 18:42           ` Charlie Brady
2005-02-13 21:21             ` Thomas Schwinge
2005-02-13 13:48         ` Gerrit Pape
2005-02-13 18:19           ` Lars Kellogg-Stedman
2005-02-14 16:23             ` Clemens Fischer
2005-02-13  3:59     ` Lars Kellogg-Stedman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=lars-D190CB.08045912022005@sea.gmane.org \
    --to=lars@oddbit.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).