You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- ``connectTimeoutMS`` is a `connection-setting <https://mongodb.github.io/node-mongodb-native/3.5/reference/connecting/connection-settings/>`_ option that sets the time in milliseconds to establish a connection to the MongoDB server before timing out.
25
+
- | ``connectTimeoutMS`` is a :doc:`connection option </fundamentals/connection#connection-options>` that sets the time in milliseconds for an individual connection from your connection pool to establish a TCP connection to the MongoDB server before timing out. Use the ``serverSelectionTimeoutMS`` option instead to fail when :node-api:`MongoClient.connect <MongoClient.html#.connect>` is unable to establish a connection with the MongoDB server.
26
+
|
27
+
| **Default:** 30000
28
28
* - socketTimeoutMS
29
-
- 360000
30
-
- ``socketTimeoutMS`` is a ``connection-settings`` option that sets the number of milliseconds a socket stays inactive after the driver has successfully connected before closing the connection.
29
+
- ``socketTimeoutMS`` specifies the amount of time the driver waits
30
+
for an inactive socket before closing it. The default value is to
31
+
never time out the socket. This option applies only to sockets that
32
+
have already been connected.
31
33
* - maxTimeMS
32
-
- N/A
33
-
- :node-api:`maxTimeMS() </Cursor.html#maxTimeMS>` is a :manual:`cursor method </reference/method/js-cursor>` that specifies the max time limit for processing an operation on a cursor. If an operation runs over the time allotted it will return a timeout error.
34
+
- :node-api:`maxTimeMS </Cursor.html#maxTimeMS>` is the maximum
35
+
amount of time the server should wait for an operation to complete
36
+
after it has reached the server. If an operation runs over the
37
+
specified time limit, it returns a timeout error.
34
38
35
39
How Can I Prevent the Driver From Hanging During Connection or From Spending Too Long Trying to Reach Unreachable Replica Sets?
0 commit comments