From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.comp.sysutils.supervision.general/1333 Path: news.gmane.org!not-for-mail From: Alex Efros Newsgroups: gmane.comp.sysutils.supervision.general Subject: Re: graceful restart under runit Date: Fri, 17 Nov 2006 15:34:35 +0200 Organization: asdfGroup Inc., http://powerman.asdfGroup.com/ Message-ID: <20061117133435.GB2153@home.power> References: <20061115114754.GA3759@fly.srk.fer.hr> <20061115160850.GA26987@home.power> <20061116152446.GA4721@fly.srk.fer.hr> <20061117001519.GA652@home.power> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163770492 4867 80.91.229.2 (17 Nov 2006 13:34:52 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Fri, 17 Nov 2006 13:34:52 +0000 (UTC) Original-X-From: supervision-return-1569-gcsg-supervision=m.gmane.org@list.skarnet.org Fri Nov 17 14:34:50 2006 Return-path: Envelope-to: gcsg-supervision@gmane.org Original-Received: from antah.skarnet.org ([212.85.147.14]) by ciao.gmane.org with smtp (Exim 4.43) id 1Gl3rY-0008QP-Hm for gcsg-supervision@gmane.org; Fri, 17 Nov 2006 14:34:36 +0100 Original-Received: (qmail 26341 invoked by uid 76); 17 Nov 2006 13:34:58 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Archive: Original-Received: (qmail 26335 invoked from network); 17 Nov 2006 13:34:58 -0000 Original-To: supervision@list.skarnet.org Mail-Followup-To: supervision@list.skarnet.org Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.13 (2006-08-11) Xref: news.gmane.org gmane.comp.sysutils.supervision.general:1333 Archived-At: Hi! 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.) -- WBR, Alex.