mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Performance tuning in config/puma.rb
This commit is contained in:
parent
efaf07178f
commit
de646019fb
1 changed files with 5 additions and 5 deletions
|
|
@ -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("WEB_CONCURRENCY") { 2 }
|
workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
||||||
|
|
||||||
# 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
|
||||||
|
|
@ -30,7 +30,7 @@ environment ENV.fetch("RAILS_ENV") { "development" }
|
||||||
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
||||||
# block.
|
# block.
|
||||||
#
|
#
|
||||||
# preload_app!
|
preload_app!
|
||||||
|
|
||||||
# The code in the `on_worker_boot` will be called if you are using
|
# The code in the `on_worker_boot` will be called if you are using
|
||||||
# clustered mode by specifying a number of `workers`. After each worker
|
# clustered mode by specifying a number of `workers`. After each worker
|
||||||
|
|
@ -39,9 +39,9 @@ environment ENV.fetch("RAILS_ENV") { "development" }
|
||||||
# or connections that may have been created at application boot, Ruby
|
# or connections that may have been created at application boot, Ruby
|
||||||
# cannot share connections between processes.
|
# cannot share connections between processes.
|
||||||
#
|
#
|
||||||
# on_worker_boot do
|
on_worker_boot do
|
||||||
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
||||||
# end
|
end
|
||||||
|
|
||||||
# Allow puma to be restarted by `rails restart` command.
|
# Allow puma to be restarted by `rails restart` command.
|
||||||
plugin :tmp_restart
|
plugin :tmp_restart
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue