See PR: https://github.com/mongodb/mongoid/pull/5808
^^^
Currently there is a Mongoid.disconnect_clients method but no Add Mongoid.reconnect_clients method. The documentation currently recommends this:
before_fork do |server, worker| Mongoid.disconnect_clients end after_fork do |server, worker| Mongoid::Clients.clients.each do |name, client| client.close client.reconnect end end
The after_fork should have a single Mongoid.reconnect_clients method instead of ad-hoc code.
- is related to
-
MONGOID-5724 Improve forking guidance with full error message
- Backlog