before_fork do
ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
end
on_worker_boot do
ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
end
The puma docs do not mention this as being required. I haven't found anything online saying it is required but https://github.com/heroku/barnes/issues/36 suggests that it might not be.
The default config/puma.rb generated by Rails 7 does not include these lines.
We should remove these lines if they are not required. Determining that needs more research and then trying it on some real apps before commiting it to this template.
Our puma config includes:
The puma docs do not mention this as being required. I haven't found anything online saying it is required but https://github.com/heroku/barnes/issues/36 suggests that it might not be.
The default
config/puma.rb
generated by Rails 7 does not include these lines.We should remove these lines if they are not required. Determining that needs more research and then trying it on some real apps before commiting it to this template.