mirror of
https://github.com/discourse/discourse.git
synced 2025-03-03 09:49:42 +00: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
|
end
|
||||||
|
|
||||||
ActiveRecord::Base.connection.disconnect!
|
RailsMultisite::ConnectionManagement.each_connection do
|
||||||
|
ActiveRecord::Base.connection_pool.disconnect!
|
||||||
|
end
|
||||||
|
|
||||||
$redis._client.disconnect
|
$redis._client.disconnect
|
||||||
|
|
||||||
# Throttle the master from forking too quickly by sleeping. Due
|
# Throttle the master from forking too quickly by sleeping. Due
|
||||||
|
Loading…
x
Reference in New Issue
Block a user