diff --git a/config/puma.rb b/config/puma.rb new file mode 100644 index 000000000..53c3cead5 --- /dev/null +++ b/config/puma.rb @@ -0,0 +1,14 @@ +preload_app! + +threads 1, 4 +workers 2 + +on_worker_boot do + ActiveSupport.on_load(:active_record) do + ActiveRecord::Base.establish_connection + end +end + +before_fork do + ActiveRecord::Base.connection_pool.disconnect! +end