summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-04-21 15:28:47 +0000
committerStan Hu <stanhu@gmail.com>2016-04-21 15:28:47 +0000
commitffef71d99befeceda618366a0cd9160735515f29 (patch)
treeb367fb224cbbe7aef4dd29b222f9ceb3d9f00037
parent7ded28ff99d89d2ba51a522992f048ed446b4ce3 (diff)
parent103c4053390dd05af5f97c608ed81d196225f933 (diff)
downloadgitlab-ce-ffef71d99befeceda618366a0cd9160735515f29.tar.gz
Merge branch 'sidekiq-memory-sigterm' into 'master'
Use SIGTERM during Sidekiq memory shutdown This makes the memory killer behave more like 'sidekiqctl stop'. Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/15359 Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/14462 See merge request !3853
-rw-r--r--lib/gitlab/sidekiq_middleware/memory_killer.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/gitlab/sidekiq_middleware/memory_killer.rb b/lib/gitlab/sidekiq_middleware/memory_killer.rb
index 37232743325..ae85b294d31 100644
--- a/lib/gitlab/sidekiq_middleware/memory_killer.rb
+++ b/lib/gitlab/sidekiq_middleware/memory_killer.rb
@@ -29,8 +29,8 @@ module Gitlab
"in #{GRACE_TIME} seconds"
sleep(GRACE_TIME)
- Sidekiq.logger.warn "sending SIGUSR1 to PID #{Process.pid}"
- Process.kill('SIGUSR1', Process.pid)
+ Sidekiq.logger.warn "sending SIGTERM to PID #{Process.pid}"
+ Process.kill('SIGTERM', Process.pid)
Sidekiq.logger.warn "waiting #{SHUTDOWN_WAIT} seconds before sending "\
"#{SHUTDOWN_SIGNAL} to PID #{Process.pid}"