DB connection now correctly closed on each rotate.