[Labs-l] Webservice

Petr Bena benapetr at gmail.com
Mon Jul 14 19:11:27 UTC 2014


Until we get a stable solution I hacked out this C code:
https://tools.wmflabs.org/paste/view/41f0da78

you can just run this as your tool on tools-login or tools-dev, it
will fork() a daemon, that runs less than 500kb of operating memory
and checks every 20 seconds if your webservice is running and if it's
not, it will spawn it.

I copied it to /shared so your can just run:

/shared/keeperd

on toold-dev as your tool and it should do the checks...

On Fri, Jul 11, 2014 at 9:12 PM, Marc-André Pelletier
<mpelletier at wikimedia.org> wrote:
> On 07/11/2014 02:30 PM, Petr Bena wrote:
>> nope, just once in minute, crontab doesn't handle seconds, it wouldn't
>> fire up anything but the check if it's running
>
> I'm currently looking at some system by which tool maintainers may
> specify automatic restart scripts that are sufficiently robust for
> general use.
>
> Amongst other requirements, it will send an obligatory email on every
> restart and will refuse to restart more than X times in a window of Y
> (where X and Y are still undecided but likely to be 3 and 24h).  This is
> to prevent problematic tools from hammering on resources unattended.
>
> -- Marc
>
>
> _______________________________________________
> Labs-l mailing list
> Labs-l at lists.wikimedia.org
> https://lists.wikimedia.org/mailman/listinfo/labs-l



More information about the Labs-l mailing list