Class: GitLab::Exporter::WebExporter::RunGC
- Inherits:
-
Object
- Object
- GitLab::Exporter::WebExporter::RunGC
- Defined in:
- lib/gitlab_exporter/web_exporter.rb
Overview
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
Instance Method Summary collapse
- #call(env) ⇒ Object
-
#initialize(app) ⇒ RunGC
constructor
A new instance of RunGC.
Constructor Details
#initialize(app) ⇒ RunGC
Returns a new instance of RunGC.
46 47 48 |
# File 'lib/gitlab_exporter/web_exporter.rb', line 46 def initialize(app) @app = app end |
Instance Method Details
#call(env) ⇒ Object
50 51 52 53 54 |
# File 'lib/gitlab_exporter/web_exporter.rb', line 50 def call(env) @app.call(env).tap do GC.start end end |