This is a temporary workaround for the issue in https://github.com/rails/rails/pull/36949 Discussing a proper fix in Rails with the Rails team. Prior to this fix we were spinning up a thread every time we closed a connection to the db.