From: Gerrit Pape <pape@smarden.org>
Subject: Re: runit under sysvinit - coping when runsvdir dies
Date: Thu, 17 Nov 2005 09:08:51 +0000 [thread overview]
Message-ID: <20051117090319.29817.qmail@f69151e2a0a700.315fe32.mid.smarden.org> (raw)
In-Reply-To: <dlajh8$eqj$1@sea.gmane.org>
On Mon, Nov 14, 2005 at 12:03:20PM -0600, Charles Duffy wrote:
> I recently had a situation on a fielded server where runsvdir (from
> runit 1.2.3) apparently died; in any event, all the runsv processes
> which would typically be directly under runsvdir were instead inherited
> by sysvinit and running there. However, since runsvdir was respawned by
> sysvinit, a great deal of CPU time was being spent continuously trying
> to start new runsv instances under the fresh runsvdir -- attempts which
> failed because there were still runsv instances alive and holding open
> the relevant locks. I killed the old runsv instances with "runsvctrl e",
> and fresh children of the new runsvdir took their place -- but there are
> still some questions raised:
>
> - How could this have happened? The system's message log doesn't show
> the OOM killer taking down runsvdir or any segfault on the part of the same.
Charlie answered that.
> - How could such situations be more gracefully handled in the future?
> Having the customer call and complain because their server was unusably
> slow was a less-than-ideal way to find out about this issue.
If runsvdir receives the HUP signal, it sends a term signal to all runsv
processes it manages. On the TERM signal, it simply exits, leaving the
runsv processes alone. Maybe I should switch that, so that TERM signals
'by mistake' are handled better. It then would re-init the complete
system, stopping all services plus supervisors on TERM, and starting
them up again after being re-spawned through inittab.
I'm not yet sure about side-effects of this change though.
Regards, Gerrit.
next prev parent reply other threads:[~2005-11-17 9:08 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-14 18:03 Charles Duffy
2005-11-16 3:50 ` Charlie Brady
2005-11-17 9:08 ` Gerrit Pape [this message]
2005-11-17 11:13 ` Charles Duffy
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=20051117090319.29817.qmail@f69151e2a0a700.315fe32.mid.smarden.org \
--to=pape@smarden.org \
/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).