Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Manually compact GC before fork #2093

Merged
merged 1 commit into from Dec 18, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -52,6 +52,7 @@ matrix:
- rvm: ruby-head
env: jit=yes
- rvm: truffleruby
- rvm: 2.7.0-preview3

allow_failures:
- rvm: jruby-9.2.9.0
Expand Down
1 change: 1 addition & 0 deletions History.md
Expand Up @@ -4,6 +4,7 @@
* Add pumactl `thread-backtraces` command to print thread backtraces (#2053)
* Configuration: `environment` is read from `RAILS_ENV`, if `RACK_ENV` can't be found (#2022)
* `Puma.stats` now returns a Hash instead of a JSON string (#2086)
* `GC.compact` is called before fork if available (#2093)

* Bugfixes
* Your bugfix goes here (#Github Number)
Expand Down
1 change: 1 addition & 0 deletions lib/puma/cluster.rb
Expand Up @@ -486,6 +486,7 @@ def run
@master_read, @worker_write = read, @wakeup

@launcher.config.run_hooks :before_fork, nil
GC.compact if GC.respond_to?(:compact)

spawn_workers

Expand Down