Fix up \DB connection testing and add limit of 3 errors