- Reference >
- Database Commands >
- Diagnostic Commands >
- shardConnPoolStats
shardConnPoolStats¶
On this page
Definition¶
-
shardConnPoolStats¶ Returns information on the pooled and cached connections in the sharded connection pool. The command also returns information on the per-thread connection cache in the connection pool.
The
shardConnPoolStatscommand uses the following syntax:The sharded connection pool is specific to connections between members in a sharded cluster. The
mongosinstances in a cluster use the connection pool to execute client reads and writes. Themongodinstances in a cluster use the pool when issuingmapReduceto query temporary collections on other shards.When the cluster requires a connection, MongoDB pulls a connection from the sharded connection pool into the per-thread connection cache. MongoDB returns the connection to the connection pool after every operation.
Output¶
Displays connection status for each config server, replica set, and standalone instance in the cluster.
The number of connections available for this host to connect to the
mongos.
The number of connections the host has ever created to connect to the
mongos.
Displays information specific to replica sets.
Holds an array of documents that report on each replica set member. These values derive from the replica set status values.
The host address in the format
[hostname]:[port].
This field is for internal use. Reports
falsewhen themongoseither cannot connect to instance or received a connection exception or error.
The host is the replica set’s primary if this is set to
true.
The host is a hidden member of the replica set if this is set to
true.
The host is a hidden member of the replica set if this is set to
true.The host is a secondary member of the replica set if this is set to
true.
The latency, in milliseconds, from the
mongosto this member.
The member has tags configured.
The number connections in the cluster’s connection pool.
The number of connections to a shard.
The number of connections to a replica set.
The number of connections to the config database.
The number of connections available from the
mongosto the config servers, replica sets, and standalonemongodinstances in the cluster.
The number of connections the
mongoshas ever created to other members of the cluster.
Displays information on the per-thread connection cache.
Displays each incoming client connection. For a
mongos, this array field displays one document per incoming client thread. For amongod, the array displays one entry per incoming shardedmapReduceclient thread.The host using the connection. The host can be a config server, replica set, or standalone instance.
The number of times the host pulled a connection from the pool.
The thread’s availability.
The namespaces used on this connection thus far.