mirror of
https://github.com/discourse/discourse.git
synced 2024-11-22 08:57:10 -06:00
FIX: Disconnects all connections in the pool before forking.
* We were leaking connections as a result. Connections opened before the fork were never closed.
This commit is contained in:
parent
aa5805e8b0
commit
a4e6662833
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user