mirror of
https://github.com/discourse/discourse.git
synced 2025-05-22 16:41:17 +08:00
ActiveRecord in Rails 5.2 discards connection pools after fork.
This commit is contained in:
@ -436,8 +436,6 @@ module Discourse
|
||||
# in a bad state
|
||||
def self.after_fork
|
||||
# note: all this reconnecting may no longer be needed per https://github.com/redis/redis-rb/pull/414
|
||||
current_db = RailsMultisite::ConnectionManagement.current_db
|
||||
RailsMultisite::ConnectionManagement.establish_connection(db: current_db)
|
||||
MessageBus.after_fork
|
||||
SiteSetting.after_fork
|
||||
$redis._client.reconnect
|
||||
|
Reference in New Issue
Block a user