diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rb index 01c800b1986..3faf9f584ba 100644 --- a/config/unicorn.conf.rb +++ b/config/unicorn.conf.rb @@ -210,7 +210,10 @@ before_fork do |server, worker| end - ActiveRecord::Base.connection.disconnect! + RailsMultisite::ConnectionManagement.each_connection do + ActiveRecord::Base.connection_pool.disconnect! + end + $redis._client.disconnect # Throttle the master from forking too quickly by sleeping. Due