Sha256: ed431d2534ba769e0881dd801314456bd9f8f309a510b3c7dc608d35ffc51493

Contents?: true

Size: 1.26 KB

Versions: 10

Compression:

Stored size: 1.26 KB

Contents

# https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server

# The environment variable WEB_CONCURRENCY may be set to a default value based
# on dyno size. To manually configure this value use heroku config:set
# WEB_CONCURRENCY.
#
# Increasing the number of workers will increase the amount of resting memory
# your dynos use. Increasing the number of threads will increase the amount of
# potential bloat added to your dynos when they are responding to heavy
# requests.
#
# Starting with a low number of workers and threads provides adequate
# performance for most applications, even under load, while maintaining a low
# risk of overusing memory.
workers Integer(ENV.fetch("WEB_CONCURRENCY", 2))
threads_count = Integer(ENV.fetch("MAX_THREADS", 2))
threads(threads_count, threads_count)

preload_app!

rackup DefaultRackup
port ENV.fetch('PORT', 3000)
rack_env = ENV.fetch("RACK_ENV", "development")
environment rack_env

# Set 1 day timeout for workers while developing
worker_timeout 24 * 60 * 60 if rack_env == "development"

on_worker_boot do
  # Worker specific setup for Rails 4.1+
  # See: https://devcenter.heroku.com/articles/deploying-rails-applications-with-the-puma-web-server#on-worker-boot
  ActiveRecord::Base.establish_connection
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
potassium-7.2.0 lib/potassium/assets/config/puma.rb
potassium-7.1.0 lib/potassium/assets/config/puma.rb
potassium-7.0.0 lib/potassium/assets/config/puma.rb
potassium-6.7.0 lib/potassium/assets/config/puma.rb
potassium-6.6.0 lib/potassium/assets/config/puma.rb
potassium-6.5.0 lib/potassium/assets/config/puma.rb
potassium-6.4.0 lib/potassium/assets/config/puma.rb
potassium-6.3.0 lib/potassium/assets/config/puma.rb
potassium-6.2.0 lib/potassium/assets/config/puma.rb
potassium-6.1.0 lib/potassium/assets/config/puma.rb