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 ability to set minimum Puma threads with MIN_THREADS environment variable #21048
Conversation
Looks good to me |
Moving the Helm chart out to mastodon/chart |
@Gargron This isn't directly related to the helm chart, but rather expands control of Puma via environment variables. So I'd still like to see it merged :) |
config/puma.rb
Outdated
@@ -1,7 +1,8 @@ | |||
persistent_timeout ENV.fetch('PERSISTENT_TIMEOUT') { 20 }.to_i | |||
|
|||
threads_count = ENV.fetch('MAX_THREADS') { 5 }.to_i | |||
threads threads_count, threads_count | |||
min_threads_count = ENV.fetch('MIN_THREADS') { 5 }.to_i |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This changes behaviour, perhaps fallback to MAX_THREADS
value instead? Unless changing the behaviour is a performance improvement of some sort.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're right, good catch. Fixed it to default to max_thread_count
as you suggested. This should ensure identical behavior if MIN_THREADS
is not set.
c597cff
to
471573d
Compare
No description provided.