Re: runit kill runsv

From: Avery Payne <>
Date: Wed, 22 Jun 2016 15:08:46 +0000

>I am try to reproduce situation when runsv under some catastrophic
>when runsv got killed, it will restart, but my test daemon "memcached"
>still running on background, eventually it will start memcached twice.
>could I avoid this from happening? Seems fault handling isn't that
>great on
>this matter.
It almost sounds like you need to chain-load memcached using chpst. If
memcached has internal code to change its process group then it is
"escaping" supervision, which means that runsv is not in direct control
of it. To fix this, your ./run script would be similar to:

exec 2>&1
exec chpst -P memcached

See for details. This would cause
memcached to be "captive" to the runsv process. Try the change with
chpst and see what happens. You may find other issues you're not seeing
after you make this change; check the log with tail -f /path/to/log/file
and see if it is restarting over and over (a "restart loop").
Received on Wed Jun 22 2016 - 15:08:46 UTC

This archive was generated by hypermail 2.3.0 : Sun May 09 2021 - 19:44:19 UTC