How many connections does each mongos need?
In a sharded configuration will have 1 incoming connection from the client but may need 1 outgoing connection to each shard (possibly mongos times the number of nodes if the shard is backed by a replicaset).
This means that the possible number of open connections that a server requires could be (1 + (N*M) * C)where N = number of mongos shards, M = number of replicaset nodes, and C = number of client connections.
Why does mongos never seem to give up connections?
mongos uses a set of connection pools to communicate to each shard (or shard replicaset node). These pools of connections do not currently
constrict when the number of clients decreases. This will lead to a possibly large number of connections being kept if you have even used the mongos
instance before, even if it is currently not being used.
How can I see the connections used by mongos ?
Run this command on each instance: mongos