Ensuring database connection is restarted.