diff options
author | Robert Speicher <robert@gitlab.com> | 2017-07-27 15:47:01 +0000 |
---|---|---|
committer | Robert Speicher <robert@gitlab.com> | 2017-07-27 15:47:01 +0000 |
commit | 98619a49c8e239a9e7c39451d72de4855a3eef9e (patch) | |
tree | 2d02158f7134daab3b1461b79f692a3b77a6c26d /config | |
parent | d5f91df9a5e5adf58f1729cda728babcd10f7099 (diff) | |
parent | 3265ac4f39e6760340722c524113ac1691fdcf8d (diff) | |
download | gitlab-ce-98619a49c8e239a9e7c39451d72de4855a3eef9e.tar.gz |
Merge branch 'pawel/prometheus_client_pid_reuse_error' into 'master'
Fix prometheus client pid reuse bug
See merge request !13130
Diffstat (limited to 'config')
-rw-r--r-- | config/unicorn.rb.example | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/config/unicorn.rb.example b/config/unicorn.rb.example index 40a16a32359..cc10da2bd88 100644 --- a/config/unicorn.rb.example +++ b/config/unicorn.rb.example @@ -121,6 +121,10 @@ after_fork do |server, worker| defined?(ActiveRecord::Base) and 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 # restart any other shared sockets/descriptors such as Memcached, # and Redis. TokyoCabinet file handles are safe to reuse |