Skip to content
Snippets Groups Projects
Commit 3265ac4f authored by Pawel Chojnacki's avatar Pawel Chojnacki
Browse files

Update prometheus client gem to fix problems with PID handling following

unicorn forking new workers.
parent ef50875d
No related branches found
No related tags found
No related merge requests found
Loading
@@ -286,7 +286,7 @@ group :metrics do
Loading
@@ -286,7 +286,7 @@ group :metrics do
gem 'influxdb', '~> 0.2', require: false gem 'influxdb', '~> 0.2', require: false
   
# Prometheus # Prometheus
gem 'prometheus-client-mmap', '~>0.7.0.beta9' gem 'prometheus-client-mmap', '~>0.7.0.beta11'
gem 'raindrops', '~> 0.18' gem 'raindrops', '~> 0.18'
end end
   
Loading
Loading
Loading
@@ -595,7 +595,7 @@ GEM
Loading
@@ -595,7 +595,7 @@ GEM
premailer-rails (1.9.7) premailer-rails (1.9.7)
actionmailer (>= 3, < 6) actionmailer (>= 3, < 6)
premailer (~> 1.7, >= 1.7.9) premailer (~> 1.7, >= 1.7.9)
prometheus-client-mmap (0.7.0.beta10) prometheus-client-mmap (0.7.0.beta11)
mmap2 (~> 2.2, >= 2.2.7) mmap2 (~> 2.2, >= 2.2.7)
pry (0.10.4) pry (0.10.4)
coderay (~> 1.1.0) coderay (~> 1.1.0)
Loading
@@ -1047,7 +1047,7 @@ DEPENDENCIES
Loading
@@ -1047,7 +1047,7 @@ DEPENDENCIES
pg (~> 0.18.2) pg (~> 0.18.2)
poltergeist (~> 1.9.0) poltergeist (~> 1.9.0)
premailer-rails (~> 1.9.7) premailer-rails (~> 1.9.7)
prometheus-client-mmap (~> 0.7.0.beta9) prometheus-client-mmap (~> 0.7.0.beta11)
pry-byebug (~> 3.4.1) pry-byebug (~> 3.4.1)
pry-rails (~> 0.3.4) pry-rails (~> 0.3.4)
rack-attack (~> 4.4.1) rack-attack (~> 4.4.1)
Loading
Loading
---
title: Fix Prometheus client PID reuse bug
merge_request: 13130
author:
Loading
@@ -121,6 +121,10 @@ after_fork do |server, worker|
Loading
@@ -121,6 +121,10 @@ after_fork do |server, worker|
defined?(ActiveRecord::Base) and defined?(ActiveRecord::Base) and
ActiveRecord::Base.establish_connection ActiveRecord::Base.establish_connection
   
# reset prometheus client, this will cause any opened metrics files to be closed
defined?(::Prometheus::Client.reinitialize_on_pid_change) &&
Prometheus::Client.reinitialize_on_pid_change
# if preload_app is true, then you may also want to check and # if preload_app is true, then you may also want to check and
# restart any other shared sockets/descriptors such as Memcached, # restart any other shared sockets/descriptors such as Memcached,
# and Redis. TokyoCabinet file handles are safe to reuse # and Redis. TokyoCabinet file handles are safe to reuse
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment