A platform for community discussion. Free, open, simple.
FIX: Disconnects all connections in the pool before forking.
Guo Xiang Tana4e666283337
diff --git a/config/unicorn.conf.rb b/config/unicorn.conf.rbindex 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