On Jun 22, 2016 5:39 PM, "Thomas Lau" <tlau <[email protected]>@ <[email protected]>tetrioncapital.com <[email protected]>> wrote: > > here is the run script: > > #!/bin/sh > exec 2>&1 > echo "*** Starting service ..." > RUNASUSER="tlau" > RUNASUID=$(getent passwd $RUNASUSER | cut -d: -f3) > RUNASGROUPS=$(id -G $RUNASUSER | tr ' ' ':') > exec chpst -u :$RUNASUID:$RUNASGROUPS /usr/bin/memcached -vvv -m 64 > Your runscript seems ok, I'd probably do the user lookup differently but that's mostly a style thing. > > I just tested -P, doesn't help and I could kill runsv process, memcached daemon still running. > > I know OOM might not kill it, just trying to simulate what happen, who knows when I was working on a system at 3AM in the morning and accidentally kill runsv? :) I want to find out how is runit fault tolerance level.
Oh, it sounded like you were having real issues. Runsv (and the rest of the runit suite) should stay functional well after the rest of the system has been run into the ground. As long as you avoid issuing a "killall -9 runsv" or something equally catastrophic you should be ok. Generally speaking, as long as you use the sv command instead of direct signaling, you're good to go. In my history of using supervision-heavy systems and getting paged awake at 3 AM, screwing up the supervisor is low on my list of mistakes. Cheers! -Colin
