Active record reset database connection issues - ActiveRecord::Connection.clear_active_connections

Viewed 6489

Can some body explain me what does these two function exactly do, i am not able to understand it through rails api.

  ActiveRecord::Connection.clear_active_connections!
  ActiveRecord::Connection.clear_all_connections!()

I am working on an application, in which i have to make dynamic db connection. Do i need to put these lines before making a new connection. When i make a new connection what happens to old connection, since i do not remove it explicitly, does this happens automatically ?

1 Answers
Related