diff --git a/source/faq/diagnostics.txt b/source/faq/diagnostics.txt index a7ef92b660c..2eea69ab47c 100644 --- a/source/faq/diagnostics.txt +++ b/source/faq/diagnostics.txt @@ -29,31 +29,47 @@ following commands: .. _faq-keepalive: -Does TCP ``keepalive`` time affect sharded clusters and replica sets? ---------------------------------------------------------------------- - -If you experience socket errors between members of a sharded cluster -or replica set, that do not have other reasonable causes, check the -TCP keep alive value, which Linux systems store as the -``tcp_keepalive_time`` value. A common keep alive period is ``7200`` -seconds (2 hours); however, different distributions and OS X may have -different settings. For MongoDB, you will have better experiences with -shorter keepalive periods, on the order of ``120`` seconds (two minutes). +Does TCP ``keepalive`` time affect MongoDB Deployments? +------------------------------------------------------- + +If you experience socket errors between clients and servers or between +members of a sharded cluster or replica set that do not have other +reasonable causes, check the TCP keepalive value, which Linux systems +store as the ``tcp_keepalive_time`` value. A common keepalive period +is ``7200`` seconds (2 hours); however, different distributions and OS +X may have different settings. For MongoDB, you will have better +experiences with shorter keepalive periods, on the order of ``120`` +seconds (two minutes). + +If your MongoDB deployment experiences keepalive-related issues, you +must alter the ``tcp_keepalive_time`` value on all machines hosting +MongoDB processes. This includes all machines hosting +:program:`mongos` or :program:`mongod` servers and all machines +hosting client processes that connect to MongoDB. + +.. versionchanged:: 2.0 + +Beginning in release series 2.0, :program:`mongod` and :program:`mongos` +processes independently set keepalive times to a minumum of 5 minutes on +their own sockets. .. include:: /includes/fact-tcp-keepalive-linux.rst .. include:: /includes/fact-tcp-keepalive-osx.rst + +The above methods of setting the TCP keepalive are not persistent; you +will need to reset the new ``tcp_keepalive_time`` value each time you +reboot or restart a system. see your operating system's documentation +for setting the TCP keepalive value persistently. + .. include:: /includes/fact-tcp-keepalive-windows.rst -The new ``tcp_keepalive_time`` value takes effect without requiring -you to restart the :program:`mongod` or :program:`mongos` -servers. When you reboot or restart your system you will need to set -the new ``tcp_keepalive_time`` value, or see your operating system's -documentation for setting the TCP keepalive value persistently. +.. versionchanged:: 2.0 -If your replica set or sharded cluster experiences keepalive-related -issues, you must alter the ``tcp_keepalive_time`` value on all machines -hosting MongoDB processes. This includes all machines hosting -:program:`mongos` or :program:`mongod` servers. +You will need to restart :program:`mongod` and :program:`mongos` +servers for new system-wide ``tcp_keepalive_time`` settings to take +effect on server versions newer than 2.0 if the new value is less than +600 seconds. Values greater than or equal to 600 seconds will be +ignored by :program:`mongod` and :program:`mongos`. What tools are available for monitoring MongoDB? ------------------------------------------------