-
Notifications
You must be signed in to change notification settings - Fork 991
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #28126 - improve dynflow sidekiq service
- Loading branch information
1 parent
c8ba2c0
commit 0708f7c
Showing
1 changed file
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,26 @@ | ||
[Unit] | ||
Description=Foreman jobs daemon on sidekiq | ||
Description=Foreman jobs daemon - %i on sidekiq | ||
Documentation=https://theforeman.org | ||
After=network.target remote-fs.target nss-lookup.target | ||
|
||
[Service] | ||
Type=forking | ||
Type=simple | ||
User=foreman | ||
TimeoutSec=90 | ||
Environment=RAILS_ENV=production | ||
Environment=DYNFLOW_SIDEKIQ_SCRIPT=/usr/share/foreman/extras/dynflow-sidekiq.rb | ||
# Greatly reduce Ruby memory fragmentation and heap usage | ||
# https://www.mikeperham.com/2018/04/25/taming-rails-memory-bloat/ | ||
Environment=MALLOC_ARENA_MAX=2 | ||
WorkingDirectory=/usr/share/foreman | ||
ExecStart=/usr/bin/sidekiq -e ${RAILS_ENV} -r ${DYNFLOW_SIDEKIQ_SCRIPT} -C /etc/foreman/dynflow/%i.yml | ||
ExecReload=/usr/bin/kill -TSTP $MAINPID | ||
|
||
SyslogIdentifier=dynflow-sidekiq@%i | ||
|
||
# if we crash, restart | ||
RestartSec=1 | ||
Restart=on-failure | ||
|
||
[Install] | ||
WantedBy=multi-user.target |