sudo lsof | grep mongoDB | grep TCP
db.serverStatus().connections
{ "current" : 253, "available" : 50947, "totalCreated" : NumberLong(818) }
mongoMongoDB Support => enabledVersion => 1.6.11Streams Support => enabledSSL Support => enabled Supported Authentication MechanismsMONGODB-CR => enabledSCRAM-SHA-1 => enabledMONGODB-X509 => enabledGSSAPI (Kerberos) => disabledPLAIN => disabledDirective => Local Value => Master Valuemongo.allow_empty_keys => 0 => 0mongo.chunk_size => 261120 => 261120mongo.cmd => $ => $mongo.default_host => localhost => localhostmongo.default_port => 27017 => 27017mongo.is_master_interval => 15 => 15mongo.long_as_object => 0 => 0mongo.native_long => 1 => 1mongo.ping_interval => 5 => 5
Hi Marcus,
we received an alert from the cloud manager “Connections has gone above 250” on one of our configs.
The Connections has gone above 250
alert is not set by default in Cloud Manager, and therefore was manually set by a person with access to the group. You would be able to see this in your group’s Alert setting. Please see the Manage Alerts page for more detail.
Best regards,
Kevin
The
Connections has gone above 250
alert is not set by default in Cloud Manager, and therefore was manually set by a person with access to the group. You would be able to see this in your group’s Alert setting. Please see the Manage Alerts page for more detail.
Hi Marcus,
But the strange thing here is that the connections on the configserver are constantly increasing over the time. Could this be possible due to bad software (our) / driver (old php driver) design? The software / driver connects only to a MongoS and not directly to a configserver?
The drivers do not connect to the config servers directly. It is normal for the config servers to have relatively high connection count, since they act as a “map” of the data distribution of your sharded collections, and thus the whole cluster (mongos
, mongod
that make up the shards) would need the information contained in them. For more information, you can check the config server’s logs and look for a line similar to:
[initandlisten] connection accepted from X.X.X.X:65419 #19 (10 connections now open)
You may be able to determine if the IP address X.X.X.X
is from expected sources (i.e. mongos
or mongod
, monitoring agents, etc.). There should be no connection from your application to the config servers, unless your application is specifically directed to connect to them.
Best regards,
Kevin
The drivers do not connect to the config servers directly.
It is normal for the config servers to have relatively high connection count, since they act as a “map” of the data distribution of your sharded collections, and thus the whole cluster (
mongos
,mongod
that make up the shards) would need the information contained in them.
Hi Marcus,
Ahh okay - so the more distributed data we have, the more connections to the configserver we have?
Actually it’s the number of shards you have and the number of mongos
you have, not the amount of data you have. For example, you can have a lot of data in a small number of shards, but you can also have a lot of shards with very little data.
It is perfectly normal for config servers to have many connections, since the operation of the cluster depends on them. For more information, please have a look at Config Servers and Production Cluster Architecture.
Best regards,
Kevin