Avoid connecting to MongoDB during static initialization.