gitlab-exporter 9.0.0 → 9.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b3fb1c9119047242e695cb956c7a68f7c19f564f7a274c8d503b7d4b984eed03
4
- data.tar.gz: fb77e078e08dbc9f8f81a1a82dc070944fbf49af3944c90a8e30eac59ca1c39a
3
+ metadata.gz: 04f135f6746fff19e960b1ec4c46226541cf5522b36d8f12618bdd1a8dad2998
4
+ data.tar.gz: 3dfb6dd9751dab33bd5eba3994f380d22dd1a25cc00a4d5b8071aa97e4e5d894
5
5
  SHA512:
6
- metadata.gz: 0c75097275454229a38f351618bc7eef530534726fa16d3d06b1c8fb95d5fdacc43a84d4d9781963bf27b8afc7700699bfe32d5f0f8516403edf7d5fa5a6555a
7
- data.tar.gz: 1eb96b35d5a80166dc5f587dce7de896d7533cf5822d5a17b220c0d09d858b01e5d02cfc7bbd8710b6002591efd9181cfab063b8fa8bfee698beca672536e83a
6
+ metadata.gz: 58fde6e70e4f5f1c10ec821866390867317a3d337aacb51ced2a8f0ab28b01c614909fa6abdec7063b73f4b9a23f6da49928a876a161baf715e165dc30607b2a
7
+ data.tar.gz: 8f420a0fb33a6d109a0645bcd1d178d13a57e8d049c52c65e168eaeeeb680a42e491df01e8a4f92fc6460f3f3272638af91a4a25f04cd86e4e24a899da300d2a
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gitlab-exporter (9.0.0)
4
+ gitlab-exporter (9.1.0)
5
5
  connection_pool (~> 2.2.1)
6
6
  pg (~> 1.1)
7
7
  quantile (~> 0.2.0)
@@ -1,5 +1,5 @@
1
1
  module GitLab
2
2
  module Exporter
3
- VERSION = "9.0.0".freeze
3
+ VERSION = "9.1.0".freeze
4
4
  end
5
5
  end
@@ -35,6 +35,21 @@ module GitLab
35
35
  end
36
36
  end
37
37
 
38
+ # Performs a major GC after each request. We found that this helps to free up
39
+ # several MB of memory in conjunction with sricter malloc config.
40
+ # See https://gitlab.com/gitlab-org/gitlab/-/issues/297241
41
+ class RunGC
42
+ def initialize(app)
43
+ @app = app
44
+ end
45
+
46
+ def call(env)
47
+ @app.call(env).tap do
48
+ GC.start
49
+ end
50
+ end
51
+ end
52
+
38
53
  class << self
39
54
  DEFAULT_WEB_SERVER = "webrick".freeze
40
55
 
@@ -45,6 +60,10 @@ module GitLab
45
60
  memory_threshold = (config[:server] && config[:server][:memory_threshold]) || 1024
46
61
  use MemoryKillerMiddleware, memory_threshold
47
62
  use Rack::Logger
63
+ use RunGC
64
+
65
+ # Defrag heap after everything is loaded into memory.
66
+ GC.compact
48
67
  end
49
68
 
50
69
  def logger
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gitlab-exporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.0.0
4
+ version: 9.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pablo Carranza