Sha256: 3850cfc38d0f82dcf88355971b2aa36c98075c4029173c89f4c88d7253333247

Contents?: true

Size: 1.25 KB

Versions: 31

Compression:

Stored size: 1.25 KB

Contents

# frozen_string_literal: true
# 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
# #{app_name}_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('<%= "#{app_name.upcase}_WEB_CONCURRENCY" %>', 2))
threads_count = Integer(ENV.fetch('<%= "#{app_name.upcase}_MAX_THREADS" %>', 2))
threads(2, threads_count)

preload_app!

rackup DefaultRackup
environment ENV.fetch('RACK_ENV', 'development')

worker_timeout 36000 if ENV['RAILS_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

31 entries across 31 versions & 1 rubygems

Version Path
onotole-1.2.11 templates/puma.rb.erb
onotole-1.2.10 templates/puma.rb.erb
onotole-1.2.9 templates/puma.rb.erb
onotole-1.2.8 templates/puma.rb.erb
onotole-1.2.7 templates/puma.rb.erb
onotole-1.2.6 templates/puma.rb.erb
onotole-1.2.5 templates/puma.rb.erb
onotole-1.2.4 templates/puma.rb.erb
onotole-1.2.3 templates/puma.rb.erb
onotole-1.2.2 templates/puma.rb.erb
onotole-1.2.1 templates/puma.rb.erb
onotole-1.1.21 templates/puma.rb.erb
onotole-1.1.20 templates/puma.rb.erb
onotole-1.1.19 templates/puma.rb.erb
onotole-1.1.18 templates/puma.rb.erb
onotole-1.1.17 templates/puma.rb.erb
onotole-1.1.16 templates/puma.rb.erb
onotole-1.1.15 templates/puma.rb.erb
onotole-1.1.14 templates/puma.rb.erb
onotole-1.1.13 templates/puma.rb.erb