supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Charlie Brady <charlieb-supervision@budge.apana.org.au>
Cc: supervision@list.skarnet.org
Subject: Re: graceful restart under runit
Date: Fri, 17 Nov 2006 09:53:28 -0500 (EST)	[thread overview]
Message-ID: <Pine.LNX.4.64.0611170944270.17275@e-smith.charlieb.ott.istop.com> (raw)
In-Reply-To: <20061117133435.GB2153@home.power>


On Fri, 17 Nov 2006, Alex Efros wrote:

> On Thu, Nov 16, 2006 at 07:48:55PM -0500, Paul Jarc wrote:
>>> Another option - you can ask runsv to 'x' (Exit) instead of 't' (Term).
>>> In this case runsv will send SIGTERM to your process, which can process it
>>> by just closing listening socket, waiting until existing connection finish
>>> and then exit.
>>> After few (up to 5) seconds runsv will be started again by runsvdir, and
>>> so start second process of that server (which will open listening socket
>>> again).
>> This seems worse than t.  In either case, new connections are refused
>> while the old process cleans up its current connections, but with x,
>> new connections are also refused for up to 5 seconds more.
>
> If old server continue accepting new connections for 5 seconds after
> receiving SIGTERM this solve 'connection refused' issue. (If new server
> will be started after 1 second, for example, then in next 4 seconds both
> server will have open listening socket and some connections will be
> accepted by first server and some by second AFAIK - I don't see something
> really wrong with this.)

The new server will get an "Address in use" error when it attempts to open 
the socket, if it is still in use by the old server. It will likely then 
die, and you will have to wait again for runsv to start a new one. You 
will still have a period of time when connections will not be accepted.

Gerrit, tcpsvd man page doesn't mention how tcpsvd responds to signals, 
but I would guess it doesn't go into the background and die without 
terminating its children, in response to SIGUSR1. Would you consider 
adding that behaviour?


  reply	other threads:[~2006-11-17 14:53 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-15 11:47 Dražen Kačar
2006-11-15 16:08 ` Alex Efros
2006-11-16 15:24   ` Dražen Kačar
2006-11-17  0:15     ` Alex Efros
2006-11-17  0:48       ` Paul Jarc
2006-11-17 13:34         ` Alex Efros
2006-11-17 14:53           ` Charlie Brady [this message]
2006-11-17 15:39             ` Gerrit Pape
2006-11-18  0:22             ` Alex Efros
2006-11-18  1:34               ` Charlie Brady
2006-11-18 12:31                 ` Alex Efros
2006-11-18 19:30                   ` Paul Jarc
2006-11-20 18:27                     ` Dražen Kačar
2006-11-20 19:32                       ` Paul Jarc
2006-11-20 19:43                         ` Paul Jarc
2006-11-22 19:25                         ` Dražen Kačar
2006-11-22 19:51                           ` Paul Jarc
2006-11-23 12:25                             ` Dražen Kačar
2006-11-24 21:22                               ` Paul Jarc
2006-11-17 13:14     ` Gerrit Pape

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=Pine.LNX.4.64.0611170944270.17275@e-smith.charlieb.ott.istop.com \
    --to=charlieb-supervision@budge.apana.org.au \
    --cc=supervision@list.skarnet.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).