On Thu, Aug 4, 2016 at 7:41 PM, Dan Book <[email protected]> wrote:

> Systemd has an option for this, see Restart= here https://www.freedesktop.
> org/software/systemd/man/systemd.service.html
>

Thanks, Dan!  I understand that a daemon needs to be written to
specifically handle the watchdog ping.

*Timeouts include missing the watchdog "keep-alive ping" deadline*


Do you know if this is necessary or if the other modes are generally
sufficient to ensure that the service restarts when it fails?

Moreover, would building in watchdog support to hypnotoad be a good idea?

*First of all, to make software watchdog-supervisable it needs to be
patched to send out "I am alive" signals in regular intervals in its event
loop. Patching this is relatively easy. First, a daemon needs to read the
WATCHDOG_USEC= environment variable. If it is set, it will contain the
watchdog interval in usec formatted as ASCII text string, as it is
configured for the service. The daemon should then
issuesd_notify("WATCHDOG=1") calls every half of that interval. A daemon
patched this way should transparently support watchdog functionality by
checking whether the environment variable is set and honouring the value it
is set to.*


-- http://0pointer.de/blog/projects/watchdog.html

-- 
You received this message because you are subscribed to the Google Groups 
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.

Reply via email to