supervision - discussion about system services, daemon supervision, init, runlevel management, and tools such as s6 and runit
 help / color / mirror / Atom feed
From: Alyssa Ross <hi@alyssa.is>
To: John W Higgins <wishdev@gmail.com>
Cc: Tor Rune Skoglund <trs@fourc.eu>, supervision@list.skarnet.org
Subject: Re: "Back off" setting for crashing services with s6+openrc?
Date: Fri, 23 Sep 2022 16:44:53 +0000	[thread overview]
Message-ID: <871qs2vy4a.fsf@alyssa.is> (raw)
In-Reply-To: <CAPhAwGymgEyYzSFbhV3ozAfjEUwgWW2Wzd_QO9Se7Ozw8=wnDQ@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]

John W Higgins <wishdev@gmail.com> writes:

> Good Day,
>
> On Thu, Sep 22, 2022 at 1:13 PM Tor Rune Skoglund <trs@fourc.eu> wrote:
> ...
>
>> As a generic question, is there any setting with this s6+openrc config
>> that would make s6 "back off" a configurable number of seconds before
>> doing the restart?
>>
>>
> Does something as simple as changing your run script to be something like
>
> run_my_crashing_app || sleep 10
>
> Work? The run script will sit there for 10 seconds if your app fails. Not
> built in - but should accomplish the task pretty easily.

I think there's a correctness problem with this approach.  An
s6-supervise process supervises its direct child, which is supposed to
be the daemon under supervision.  But in this case it would be the
shell, so s6 doesn't know the daemon's PID, and so can't signal it.  If
s6 tries to stop the service, it will signal the shell, which won't
necessarily do the right thing and stop the application.  An s6 service
needs to ensure that the service is stopped if s6-supervise's direct
child dies.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]

  parent reply	other threads:[~2022-09-23 20:38 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-22 19:45 Tor Rune Skoglund
2022-09-22 20:21 ` John W Higgins
2022-09-23  7:29   ` Tor Rune Skoglund
2022-09-23 16:44   ` Alyssa Ross [this message]
2022-09-24 12:33   ` Oliver Schad
2022-09-26 23:00   ` Colin Booth
2022-09-30  9:34     ` Oliver Schad
2022-09-30 13:21       ` Laurent Bercot
2022-10-04 14:16         ` Tor Rune Skoglund
2022-10-10 16:20           ` Laurent Bercot
2022-10-11  0:38         ` Dewayne

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=871qs2vy4a.fsf@alyssa.is \
    --to=hi@alyssa.is \
    --cc=supervision@list.skarnet.org \
    --cc=trs@fourc.eu \
    --cc=wishdev@gmail.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).