Skip to content
New issue

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

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

Already on GitHub? # to your account

Fix smart_restart task to check if puma preloads app #93

Merged
merged 1 commit into from
Jan 30, 2015
Merged

Fix smart_restart task to check if puma preloads app #93

merged 1 commit into from
Jan 30, 2015

Conversation

sponomarev
Copy link
Contributor

I was faced with a conflict between phased restart and puma's preload_app.

set :puma_threads, [4, 4]
set :puma_workers, 2
set :puma_preload_app, true

With this config gem invokes phased-restart, which is not recommended for preload_app.

My changes makes gem not to rely only on puma_workers, but also on puma_preload_app, to decide what restart method to be invoked.

@seuros
Copy link
Owner

seuros commented Jan 30, 2015

can you please link to where is stated that not recommended for preloaded app to be phase restarted ?

@sponomarev
Copy link
Contributor Author

@seuros Easily! In puma gems docs.

Note that preload_app can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and preload_app is all about copying the code of master into the workers.

https://github.com/puma/puma/blob/master/README.md#clustered-mode the last paragraph

seuros added a commit that referenced this pull request Jan 30, 2015
Fix smart_restart task to check if puma preloads app
@seuros seuros merged commit c44333d into seuros:master Jan 30, 2015
@seuros
Copy link
Owner

seuros commented Jan 30, 2015

Thanks you

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants