@@ -29,31 +29,47 @@ following commands:
29
29
30
30
.. _faq-keepalive:
31
31
32
- Does TCP ``keepalive`` time affect sharded clusters and replica sets?
33
- ---------------------------------------------------------------------
34
-
35
- If you experience socket errors between members of a sharded cluster
36
- or replica set, that do not have other reasonable causes, check the
37
- TCP keep alive value, which Linux systems store as the
38
- ``tcp_keepalive_time`` value. A common keep alive period is ``7200``
39
- seconds (2 hours); however, different distributions and OS X may have
40
- different settings. For MongoDB, you will have better experiences with
41
- shorter keepalive periods, on the order of ``120`` seconds (two minutes).
32
+ Does TCP ``keepalive`` time affect MongoDB Deployments?
33
+ -------------------------------------------------------
34
+
35
+ If you experience socket errors between clients and servers or between
36
+ members of a sharded cluster or replica set that do not have other
37
+ reasonable causes, check the TCP keepalive value, which Linux systems
38
+ store as the ``tcp_keepalive_time`` value. A common keepalive period
39
+ is ``7200`` seconds (2 hours); however, different distributions and OS
40
+ X may have different settings. For MongoDB, you will have better
41
+ experiences with shorter keepalive periods, on the order of ``120``
42
+ seconds (two minutes).
43
+
44
+ If your MongoDB deployment experiences keepalive-related issues, you
45
+ must alter the ``tcp_keepalive_time`` value on all machines hosting
46
+ MongoDB processes. This includes all machines hosting
47
+ :program:`mongos` or :program:`mongod` servers and all machines
48
+ hosting client processes that connect to MongoDB.
49
+
50
+ .. versionchanged:: 2.0
51
+
52
+ Beginning in release series 2.0, :program:`mongod` and :program:`mongos`
53
+ processes independently set keepalive times to a minumum of 5 minutes on
54
+ their own sockets.
42
55
43
56
.. include:: /includes/fact-tcp-keepalive-linux.rst
44
57
.. include:: /includes/fact-tcp-keepalive-osx.rst
58
+
59
+ The above methods of setting the TCP keepalive are not persistent; you
60
+ will need to reset the new ``tcp_keepalive_time`` value each time you
61
+ reboot or restart a system. see your operating system's documentation
62
+ for setting the TCP keepalive value persistently.
63
+
45
64
.. include:: /includes/fact-tcp-keepalive-windows.rst
46
65
47
- The new ``tcp_keepalive_time`` value takes effect without requiring
48
- you to restart the :program:`mongod` or :program:`mongos`
49
- servers. When you reboot or restart your system you will need to set
50
- the new ``tcp_keepalive_time`` value, or see your operating system's
51
- documentation for setting the TCP keepalive value persistently.
66
+ .. versionchanged:: 2.0
52
67
53
- If your replica set or sharded cluster experiences keepalive-related
54
- issues, you must alter the ``tcp_keepalive_time`` value on all machines
55
- hosting MongoDB processes. This includes all machines hosting
56
- :program:`mongos` or :program:`mongod` servers.
68
+ You will need to restart :program:`mongod` and :program:`mongos`
69
+ servers for new system-wide ``tcp_keepalive_time`` settings to take
70
+ effect on server versions newer than 2.0 if the new value is less than
71
+ 600 seconds. Values greater than or equal to 600 seconds will be
72
+ ignored by :program:`mongod` and :program:`mongos`.
57
73
58
74
What tools are available for monitoring MongoDB?
59
75
------------------------------------------------
0 commit comments