olzsight.blogg.se

Rack app
Rack app













Puma forks multiple OS processes within each dyno to allow a Rails app to support multiple concurrent requests. To manually configure this value use heroku config:set WEB_CONCURRENCY. The environment variable WEB_CONCURRENCY may be configured to a default value based on dyno size. You must also ensure that your Rails application has enough database connections available in the pool for all threads and workers. Threads_count = Integer(ENV || 5)Įnvironment ENV || 'development' For a simple Rails application, we recommend the following basic configuration: workers Integer(ENV || 2) ConfigĬreate a configuration file for Puma at config/puma.rb or at a path of your choosing. Make sure the Procfile is appropriately capitalized and checked into git. However, we recommend generating a config file: web: bundle exec puma -C config/puma.rb You can set most values inline: web: bundle exec puma -t 5:5 -p $ Set Puma as the server for your web process in the Procfile of your application. Adding Puma to your application Gemfileįirst, add Puma to your app’s Gemfile: gem 'puma' Always test your new deployments in a staging environment before you deploy to your production environment.















Rack app