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 ExecReload to reload puma. #406

Merged
merged 5 commits into from
Oct 3, 2017
Merged

Conversation

matyapiro31
Copy link

This enables puma to reload changes without restarting process.

Copy link
Member

@Gargron Gargron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@matyapiro31
Copy link
Author

No, I mean hot restart in this document.
https://github.com/puma/puma/blob/master/docs/restart.md
However, default configuration of mastodon is cluster mode, so mastodon can use phased restart, too.
Phased restart is safer than hot restart and no down time.
Changed to SIGUSR1.

@Gargron Gargron merged commit b197f69 into mastodon:master Oct 3, 2017
@nightpool
Copy link
Member

This does nothing on mastodon, because it's preloaded

Preloading can’t be used with phased restart, since phased restart kills and restarts workers one-by-one, and preload_app copies the code of master into the workers.

@nightpool
Copy link
Member

(I was toying with implementing phased_restart a while ago but the memory difference in preload vs non-preload made it not worth it)

@matyapiro31
Copy link
Author

@nightpool This is not for preloading.
This is safe restarting command for puma.Mastodon's upgrade is not applied until puma restarts, however restarting the process via systemctl restart mastodon-web takes some time.
This adds option to reload the change without downtime.Faster than killing process and relaunching puma server. Actually this command doesn't load puma's configuration, but it can reload mastodon's change.

@matyapiro31 matyapiro31 deleted the patch-9 branch October 7, 2017 16:04
@nightpool
Copy link
Member

Again, this configuration does not work with current mastodon.

Mastodon uses preload_app. therefore, USR1 is identical to a full restart

This pull request was closed.
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.

3 participants