The MongoDB\Driver\Exception\ConnectionTimeoutException class
The MongoDB\Driver\Exception\ConnectionTimeoutException class
(mongodb >= 1.0.0)
Introduction
Thrown when the driver fails to establish a database connection within a
specified time limit
(connectTimeoutMS)
or server selection fails
(serverSelectionTimeoutMS).