close activerecord connections actively