diff options
author | Rémy Coutable <remy@rymai.me> | 2016-06-27 15:47:16 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2016-06-27 15:47:16 +0000 |
commit | 3659992cd588e10abf6eae1519a9f76231a3bc09 (patch) | |
tree | 0e81b7aa8b1ce58b9a62560317f8e171c599bab7 | |
parent | 4f39e72773210eab7521c84fb259d6599a4950ff (diff) | |
parent | e69af6d251783ce815031b05b13f366817391959 (diff) | |
download | gitlab-ce-3659992cd588e10abf6eae1519a9f76231a3bc09.tar.gz |
Merge branch 'fix/sidekiq-mem-killer-debug' into 'master'
Better debugging for memory killer middleware
This adds more info to the warning messages output by `MemoryKiller`.
Previously only the PID was showed, making it difficult to debug issues like https://gitlab.com/gitlab-org/gitlab-ce/issues/19124
This adds the worker class and job ID to the log messages.
See merge request !4936
-rw-r--r-- | lib/gitlab/sidekiq_middleware/memory_killer.rb | 4 |
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 ae85b294d31..4831c46c4be 100644 --- a/lib/gitlab/sidekiq_middleware/memory_killer.rb +++ b/lib/gitlab/sidekiq_middleware/memory_killer.rb @@ -25,7 +25,7 @@ module Gitlab Sidekiq.logger.warn "current RSS #{current_rss} exceeds maximum RSS "\ "#{MAX_RSS}" - Sidekiq.logger.warn "this thread will shut down PID #{Process.pid} "\ + Sidekiq.logger.warn "this thread will shut down PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}"\ "in #{GRACE_TIME} seconds" sleep(GRACE_TIME) @@ -36,7 +36,7 @@ module Gitlab "#{SHUTDOWN_SIGNAL} to PID #{Process.pid}" sleep(SHUTDOWN_WAIT) - Sidekiq.logger.warn "sending #{SHUTDOWN_SIGNAL} to PID #{Process.pid}" + Sidekiq.logger.warn "sending #{SHUTDOWN_SIGNAL} to PID #{Process.pid} - Worker #{worker.class} - JID-#{job['jid']}" Process.kill(SHUTDOWN_SIGNAL, Process.pid) end end |