diff --git a/source/faq/sharding.txt b/source/faq/sharding.txt index d570c9f481e..0d09c6388d5 100644 --- a/source/faq/sharding.txt +++ b/source/faq/sharding.txt @@ -282,17 +282,7 @@ What does the ``maxConns`` setting on ``mongos`` do? The :setting:`~net.maxIncomingConnections` option limits the number of connections accepted by :program:`mongos`. -If your client driver or application creates a large number of -connections but allows them to time out rather than closing them -explicitly, then it might make sense to limit the number of -connections at the :program:`mongos` layer. - -Set :setting:`~net.maxIncomingConnections` to a value slightly higher than the -maximum number of connections that the client creates, or the maximum -size of the connection pool. This setting prevents the -:program:`mongos` from causing connection spikes on the individual -:term:`shards `. Spikes like these may disrupt the operation -and memory allocation of the :term:`sharded cluster`. +.. include:: /includes/fact-maxconns-mongos.rst How do indexes impact queries in sharded systems? ------------------------------------------------- diff --git a/source/includes/fact-maxconns-mongos.rst b/source/includes/fact-maxconns-mongos.rst new file mode 100644 index 00000000000..04e6dcd58e9 --- /dev/null +++ b/source/includes/fact-maxconns-mongos.rst @@ -0,0 +1,11 @@ +This is particularly useful for a :program:`mongos` if you have a client +that creates multiple connections and allows them to timeout rather +than closing them. + +In this case, set :setting:`~net.maxIncomingConnections` to a value slightly +higher than the maximum number of connections that the client creates, or the +maximum size of the connection pool. + +This setting prevents the :program:`mongos` from causing connection spikes on +the individual :term:`shards `. Spikes like these may disrupt the +operation and memory allocation of the :term:`sharded cluster`. diff --git a/source/includes/options-conf.yaml b/source/includes/options-conf.yaml index 242b1f99aeb..20e2df6f6d2 100644 --- a/source/includes/options-conf.yaml +++ b/source/includes/options-conf.yaml @@ -436,12 +436,8 @@ inherit: program: mongod file: options-mongod.yaml post: | - This is particularly useful for a :program:`mongos` if you have a client - that creates a number of connections but allows them to timeout rather - than close the connections. When you set this option, ensure the value - is slightly higher than the size of the connection pool or the total - number of connections, to prevent erroneous connection spikes from - propagating to the members of a sharded cluster. + .. include:: /includes/fact-maxconns-mongos.rst + --- program: conf name: net.wireObjectCheck diff --git a/source/includes/options-mongod.yaml b/source/includes/options-mongod.yaml index 5ab528333f0..4e1ff82e35f 100644 --- a/source/includes/options-mongod.yaml +++ b/source/includes/options-mongod.yaml @@ -85,8 +85,10 @@ description: | accept. This setting has no effect if it is higher than your operating system's configured maximum connection tracking threshold. - .. versionchanged:: 2.6 - MongoDB removed the upward limit on the :setting:`~net.maxIncomingConnections` setting. + Do not assign too low of a value to this option, or you will encounter errors + during normal application operation. +post: | + .. include:: /includes/note-max-conns-max.rst optional: true --- program: mongod diff --git a/source/includes/options-mongos.yaml b/source/includes/options-mongos.yaml index 7d5e9f6fda6..cf4649b4805 100644 --- a/source/includes/options-mongos.yaml +++ b/source/includes/options-mongos.yaml @@ -58,22 +58,15 @@ program: mongos name: maxConns args: directive: option -description: | - Specifies the maximum number of simultaneous connections that - :program:`mongos` will accept. This setting will have no effect if the - value of this setting is higher than your operating system's configured - maximum connection tracking threshold. +inherit: + name: maxConns + program: mongod + file: options-mongod.yaml +post: | + .. include:: /includes/fact-maxconns-mongos.rst - This setting is particularly useful for :program:`mongos` if you - have a client that creates a number of connections but allows them - to timeout rather than close the connections. When you set - :setting:`~net.maxIncomingConnections`, ensure the value is slightly - higher than the size of the connection pool or the total number of - connections to prevent erroneous connection spikes from propagating - to the members of a :term:`sharded cluster`. + .. include:: /includes/note-max-conns-max.rst - .. versionchanged:: 2.6 - MongoDB removed the upward limit on the :setting:`~net.maxIncomingConnections` setting. optional: true --- program: mongos