summaryrefslogtreecommitdiff
path: root/config
diff options
context:
space:
mode:
authorPawel Chojnacki <pawel@chojnacki.ws>2017-07-27 14:27:15 +0200
committerPawel Chojnacki <pawel@chojnacki.ws>2017-07-27 14:40:36 +0200
commit3265ac4f39e6760340722c524113ac1691fdcf8d (patch)
treef7d17ff810f1ad47b27ee5b0d28f6e882e60337f /config
parentef50875d3aa27a8e7bcc3296f911da4710be0585 (diff)
downloadgitlab-ce-3265ac4f39e6760340722c524113ac1691fdcf8d.tar.gz
Update prometheus client gem to fix problems with PID handling followingpawel/prometheus_client_pid_reuse_error
unicorn forking new workers.
Diffstat (limited to 'config')
-rw-r--r--config/unicorn.rb.example4
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