|
|
@ -3,13 +3,13 @@ |
|
|
|
# Any libraries that use thread pools should be configured to match |
|
|
|
# Any libraries that use thread pools should be configured to match |
|
|
|
# the maximum value specified for Puma. |
|
|
|
# the maximum value specified for Puma. |
|
|
|
# |
|
|
|
# |
|
|
|
threads_min_count = ENV.fetch("RAILS_MIN_THREADS") { 4 } |
|
|
|
threads_min_count = ENV.fetch("RAILS_MIN_THREADS") { 4 }.to_i |
|
|
|
threads_max_count = ENV.fetch("RAILS_MAX_THREADS") { 16 } |
|
|
|
threads_max_count = ENV.fetch("RAILS_MAX_THREADS") { 16 }.to_i |
|
|
|
threads threads_min_count, [threads_min_count, threads_max_count].max |
|
|
|
threads threads_min_count, [threads_min_count, threads_max_count].max |
|
|
|
|
|
|
|
|
|
|
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. |
|
|
|
# Specifies the `port` that Puma will listen on to receive requests; default is 3000. |
|
|
|
# |
|
|
|
# |
|
|
|
port ENV.fetch("PORT") { 3000 } |
|
|
|
port ENV.fetch("PORT") { 3000 }.to_i |
|
|
|
|
|
|
|
|
|
|
|
# Specifies the `environment` that Puma will run in. |
|
|
|
# Specifies the `environment` that Puma will run in. |
|
|
|
# |
|
|
|
# |
|
|
@ -21,7 +21,7 @@ environment ENV.fetch("RAILS_ENV") { "development" } |
|
|
|
# Workers do not work on JRuby or Windows (both of which do not support |
|
|
|
# Workers do not work on JRuby or Windows (both of which do not support |
|
|
|
# processes). |
|
|
|
# processes). |
|
|
|
# |
|
|
|
# |
|
|
|
workers ENV.fetch("OPENPROJECT_WEB_WORKERS") { 1 } |
|
|
|
workers ENV.fetch("OPENPROJECT_WEB_WORKERS") { 1 }.to_i |
|
|
|
|
|
|
|
|
|
|
|
# Use the `preload_app!` method when specifying a `workers` number. |
|
|
|
# Use the `preload_app!` method when specifying a `workers` number. |
|
|
|
# This directive tells Puma to first boot the application and load code |
|
|
|
# This directive tells Puma to first boot the application and load code |
|
|
|