diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 12:06:32 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-10-16 12:06:32 +0000 |
commit | d2ffc30fd583e86d4122bb5061098f4f3ca7b3f1 (patch) | |
tree | cb29c77a3ea49eb8ec732b0e644ed6cfad4770d9 /config | |
parent | 914ea32e0efca21436220df2c10e1bfbe4ed3da9 (diff) | |
download | gitlab-ce-d2ffc30fd583e86d4122bb5061098f4f3ca7b3f1.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'config')
-rw-r--r-- | config/initializers/7_prometheus_metrics.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/config/initializers/7_prometheus_metrics.rb b/config/initializers/7_prometheus_metrics.rb index c5cd055f4ff..d58fb54f71c 100644 --- a/config/initializers/7_prometheus_metrics.rb +++ b/config/initializers/7_prometheus_metrics.rb @@ -34,6 +34,12 @@ Sidekiq.configure_server do |config| config.on(:startup) do # webserver metrics are cleaned up in config.ru: `warmup` block Prometheus::CleanupMultiprocDirService.new.execute + # In production, sidekiq is run in a multi-process setup where processes might interfere + # with each other cleaning up and reinitializing prometheus database files, which is why + # we're re-doing the work every time here. + # A cleaner solution would be to run the cleanup pre-fork, and the initialization once + # after all workers have forked, but I don't know how at this point. + ::Prometheus::Client.reinitialize_on_pid_change(force: true) Gitlab::Metrics::Exporter::SidekiqExporter.instance.start end |