class GitLab::Exporter::WebExporter::RunGC

Performs a major GC after each request. We found that this helps to free up several MB of memory in conjunction with sricter malloc config. See gitlab.com/gitlab-org/gitlab/-/issues/297241

Public Class Methods

new(app) click to toggle source
# File lib/gitlab_exporter/web_exporter.rb, line 42
def initialize(app)
  @app = app
end

Public Instance Methods

call(env) click to toggle source
# File lib/gitlab_exporter/web_exporter.rb, line 46
def call(env)
  @app.call(env).tap do
    GC.start
  end
end