diff options
author | Eric Wong <e@80x24.org> | 2016-06-13 22:24:56 +0000 |
---|---|---|
committer | Eric Wong <e@80x24.org> | 2016-06-13 22:24:56 +0000 |
commit | 40ac0012df419f6b7d3fae8ab86f7119abf877c2 (patch) | |
tree | ae2cbcbbc631b58b45d002c6d98b33f94db171c6 /examples/unicorn@.service | |
parent | 33c2f7794dc72b59390e6199fa0a6f41fb36eeb3 (diff) | |
download | unicorn-40ac0012df419f6b7d3fae8ab86f7119abf877c2.tar.gz |
By default, systemd kills every process in the control group when stopping a service. While it ought to be harmless to signal workers, some Rack applications (and perhaps further subprocesses) can misbehave when interrupted by a signal. Ensure we only hit the master on graceful shutdown to avoid tickling bugs in Rack apps. This is the reason we switched to having the master send "fake" signals for workers beginning with unicorn 4.8.0 back in 2013/2014.
Diffstat (limited to 'examples/unicorn@.service')
-rw-r--r-- | examples/unicorn@.service | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/examples/unicorn@.service b/examples/unicorn@.service index 56aaec8..d95eb83 100644 --- a/examples/unicorn@.service +++ b/examples/unicorn@.service @@ -24,5 +24,10 @@ ExecReload = /bin/kill -HUP $MAINPID # adding a few seconds for scheduling differences: TimeoutStopSec = 62 +# Only kill the master process, it may be harmful to signal +# workers via default "control-group" setting since some +# Ruby extensions and applications misbehave on interrupts +KillMode = process + [Install] WantedBy = multi-user.target |