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

Add on_worker_fork hook, which allows to mimic Unicorn's behavior #664

Merged
merged 1 commit into from
Mar 9, 2015

Conversation

fxposter
Copy link
Contributor

@fxposter fxposter commented Mar 7, 2015

http://bogomips.org/unicorn.git/tree/lib/unicorn/configurator.rb#n154
http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-before_fork

After reading both unicorn and puma cluster implementations,
I think this hook is required when preload_app is used to drop
ActiveRecord connections, established in master process.

http://bogomips.org/unicorn.git/tree/lib/unicorn/configurator.rb#n154
http://unicorn.bogomips.org/Unicorn/Configurator.html#method-i-before_fork

After reading both unicorn and puma cluster implementations,
I think  this hook is required when `preload_app` is used to drop
ActiveRecord connections, established in master process.
evanphx added a commit that referenced this pull request Mar 9, 2015
Add `on_worker_fork` hook, which allows to mimic Unicorn's behavior
@evanphx evanphx merged commit 4967226 into puma:master Mar 9, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants