Prevent premature closing of DB connection.