mirror of
https://github.com/wahyd4/gitlabhq.git
synced 2026-08-23 11:36:09 +10:00
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
(cherry picked from commit 3659992cd5)
This commit is contained in:
committed by
Robert Speicher
parent
a688eaddc2
commit
53452ef5da
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user