blob 946de443ef360030cdd56626c3ca3b8aceda7cd3 1428 bytes (raw)
name: examples/unicorn@.service # note: path name is non-authoritative(*)
# ==> /etc/systemd/system/unicorn@.service <==
# Since SIGUSR2 upgrades do not work under systemd, this service file
# allows starting two simultaneous services during upgrade time
# (e.g. unicorn@1 unicorn@2) with the intention that they take
# turns running in-between upgrades. This should allow upgrading
# without downtime.
Description = unicorn Rack application server %i
Wants = unicorn.socket
After = unicorn.socket
# bundler users must use the "--keep-file-descriptors" switch, here:
# ExecStart = bundle exec --keep-file-descriptors unicorn -c ...
ExecStart = /usr/bin/unicorn -c /path/to/unicorn.conf.rb /path/to/config.ru
# NonBlocking MUST be true if using socket activation with unicorn.
# Otherwise, there's a small window in-between when the non-blocking
# flag is set by us and our accept4 call where systemd can momentarily
# make the socket blocking, causing us to block on accept4:
NonBlocking = true
Sockets = unicorn.socket
KillSignal = SIGQUIT
User = nobody
Group = nogroup
ExecReload = /bin/kill -HUP $MAINPID
# This is based on the Unicorn::Configurator#timeout directive,
# 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
WantedBy = multi-user.target
solving 946de44 ...
found 946de44 in https://yhbt.net/unicorn.git/
(*) Git path names are given by the tree(s) the blob belongs to.
Blobs themselves have no identifier aside from the hash of its contents.^
Code repositories for project(s) associated with this public inbox
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).