From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=MAILING_LIST_MULTI autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 17541 invoked from network); 24 Sep 2022 12:33:37 -0000 Received: from alyss.skarnet.org (95.142.172.232) by inbox.vuxu.org with ESMTPUTF8; 24 Sep 2022 12:33:37 -0000 Received: (qmail 22307 invoked by uid 89); 24 Sep 2022 12:34:02 -0000 Mailing-List: contact supervision-help@list.skarnet.org; run by ezmlm Sender: Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Received: (qmail 22300 invoked from network); 24 Sep 2022 12:34:02 -0000 Date: Sat, 24 Sep 2022 14:33:15 +0200 From: Oliver Schad To: supervision@list.skarnet.org Subject: Re: "Back off" setting for crashing services with s6+openrc? Message-ID: <20220924143315.6d11f9df@flunder.oschad.de> In-Reply-To: References: <76856b27-1653-4e3c-28a5-737b63dea1f0@fourc.eu> Organization: Automatic Server AG X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/SzQPjdSD/YC16m2y8uY+/Vo"; protocol="application/pgp-signature"; micalg=pgp-sha1 --Sig_/SzQPjdSD/YC16m2y8uY+/Vo Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Thu, 22 Sep 2022 13:21:46 -0700 John W Higgins wrote: > Good Day, >=20 > On Thu, Sep 22, 2022 at 1:13 PM Tor Rune Skoglund > wrote: ... >=20 > > 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? > > > > =20 > Does something as simple as changing your run script to be something > like >=20 > run_my_crashing_app || sleep 10 >=20 > Work? The run script will sit there for 10 seconds if your app fails. > Not built in - but should accomplish the task pretty easily. You could propably outsource the backoff mechanism, which can handle some statistics. Something like that: https://pastebin.com/aH3EDGLG You would use it in your run script as: exec with_backoff my_daemon Best Regards Oli --=20 Automatic-Server AG =E2=80=A2=E2=80=A2=E2=80=A2=E2=80=A2=E2=80=A2 Oliver Schad Gesch=C3=A4ftsf=C3=BChrer Hardstr. 46 9434 Au | Schweiz www.automatic-server.com | oliver.schad@automatic-server.com Tel: +41 71 511 31 11 | Mobile: +41 76 330 03 47 --Sig_/SzQPjdSD/YC16m2y8uY+/Vo Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iF0EARECAB0WIQR7zzwbEv6+GMBe8mxGKXFRS5aW8AUCYy75CwAKCRBGKXFRS5aW 8N+3AKCu4ZC/YA25qu5CrV1bP3XK4l4xtgCfb92SAlklGtL6dY+o0zhypNiRWbo= =68ZE -----END PGP SIGNATURE----- --Sig_/SzQPjdSD/YC16m2y8uY+/Vo--