Use two puma workers
This is the same configuration we had with unicorn. With several workers, we've got two basic configuration options: * Preload the application and use a hot restart * Don't preload the application and use a phased restart I've decided to preload the application because using a hot restart changes are available immediately, while with a phased restart there are a few seconds when both workers for the old code and workers for the new code exist. Using a phased restart also has advantages, so some forks might want to disable the `puma_preload_app` setting in order to use it.
This commit is contained in:
@@ -29,6 +29,9 @@ set :keep_releases, 5
|
||||
set :local_user, ENV["USER"]
|
||||
|
||||
set :puma_restart_command, "bundle exec --keep-file-descriptors puma"
|
||||
set :puma_workers, 2
|
||||
set :puma_preload_app, true
|
||||
set :puma_init_active_record, true
|
||||
|
||||
set :delayed_job_workers, 2
|
||||
set :delayed_job_roles, :background
|
||||
|
||||
Reference in New Issue
Block a user