puma.rb 327 B

123456789101112
  1. workers Integer(ENV['WEB_CONCURRENCY'] || 0)
  2. threads_count_min = Integer(ENV['MIN_THREADS'] || 5)
  3. threads_count_max = Integer(ENV['MAX_THREADS'] || 30)
  4. threads threads_count_min, threads_count_max
  5. environment ENV.fetch('RAILS_ENV', 'development')
  6. preload_app!
  7. on_worker_boot do
  8. ActiveRecord::Base.establish_connection
  9. end