Conversation
2cab65b to
3db3a67
Compare
Flink
commented
Dec 12, 2025
Comment on lines
-62
to
-67
| if ENV["UNICORN_SIDEKIQS"].to_i > 0 | ||
| log "Stopping job queue to reclaim memory, master pid is #{master_pid}" | ||
| Process.kill("TSTP", unicorn_master_pid) | ||
| sleep 1 | ||
| # older versions do not have support, so quickly send a cont so master process is not hung | ||
| Process.kill("CONT", unicorn_master_pid) |
Contributor
Author
There was a problem hiding this comment.
This actually doesn’t work anymore. It hasn’t for some time now, at least one year (see discourse/discourse#27257).
Flink
commented
Dec 12, 2025
| end | ||
|
|
||
| def reload | ||
| set_restart_flag |
Contributor
Author
There was a problem hiding this comment.
With #set_restart_flag/#clear_restart_flag, we’re signaling MessageBus to allow its poll call to wait for the server response instead of its default behavior of killing the request after 100 ms.
This patch introduces a web server adapter for the upgrader class. This allows the upgrader to work with both Unicorn and Pitchfork. The user experience when watching the upgrade process from the admin page should stay the same.
d079825 to
2e88152
Compare
cvx
approved these changes
Dec 17, 2025
davidtaylorhq
approved these changes
Dec 18, 2025
Flink
added a commit
to discourse/discourse
that referenced
this pull request
Dec 18, 2025
This brings the necessary changes to allow the `docker_manager` plugin to work properly with Pitchfork (see discourse/docker_manager#293). Three things are needed: - Tell our MessageBus config to not return a 429 if a request takes more than 100 ms while the Pitchfork server is restarting. - Update the Pitchfork config to allow it to reuse its own port (this allows us to start a new Pitchfork server while the old one is still running) - Update the `unicorn_launcher` script to restart the Pitchfork server when it receives a USR2/HUP signal. This way, it doesn’t complicate things too much.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a web server adapter for the upgrader class. This allows the upgrader to work with both Unicorn and Pitchfork.
The user experience when watching the upgrade process from the admin page should stay the same.
Relies on discourse/discourse#36456