diff options
author | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-05-13 18:09:12 +0300 |
---|---|---|
committer | Jacob Vosmaer <contact@jacobvosmaer.nl> | 2015-05-13 18:09:12 +0300 |
commit | c291ff9c6f795821e5b73447984e4cd72f3701a4 (patch) | |
tree | d3f3bdb00f02250e983771e1bf550ff1faaa960d /lib/gitlab | |
parent | 091c9061316888a1aee706b8b441c16e28868afe (diff) |
Use SIGKILL by default in Sidekiq::MemoryKiller
This makes the memory growth-triggered Sidekiq restarts more reliable by
reducing the chance that Sidekiq ends up in a state where it is not
accepting new jobs but also not shutting down: SIGKILL is more likely to
work than SIGTERM.
Diffstat (limited to 'lib/gitlab')
-rw-r--r-- | lib/gitlab/sidekiq_middleware/memory_killer.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/sidekiq_middleware/memory_killer.rb b/lib/gitlab/sidekiq_middleware/memory_killer.rb index f33b2dedf4a..37232743325 100644 --- a/lib/gitlab/sidekiq_middleware/memory_killer.rb +++ b/lib/gitlab/sidekiq_middleware/memory_killer.rb @@ -7,7 +7,7 @@ module Gitlab GRACE_TIME = (ENV['SIDEKIQ_MEMORY_KILLER_GRACE_TIME'] || 15 * 60).to_s.to_i # Wait 30 seconds for running jobs to finish during graceful shutdown SHUTDOWN_WAIT = (ENV['SIDEKIQ_MEMORY_KILLER_SHUTDOWN_WAIT'] || 30).to_s.to_i - SHUTDOWN_SIGNAL = (ENV['SIDEKIQ_MEMORY_KILLER_SHUTDOWN_SIGNAL'] || 'SIGTERM').to_s + SHUTDOWN_SIGNAL = (ENV['SIDEKIQ_MEMORY_KILLER_SHUTDOWN_SIGNAL'] || 'SIGKILL').to_s # Create a mutex used to ensure there will be only one thread waiting to # shut Sidekiq down |