My mongodb is community server. It’s a sharding cluster, In config server:
xxxConfig:PRIMARY> db.serverStatus().asserts
{ "regular" : 0, "warning" : 0, "msg" : 0, "user" : 335, "rollovers" : 0 }
Increase to 335 in 3 hours.
In config server log:
2020-03-05T17:01:14.724+0800 D COMMAND [replSetDistLockPinger] assertion while executing command ‘findAndModify’ on database ‘config’ with arguments ‘{ findAndModify: “lockpings”, query: { _id: “ConfigServer” }, update: { $set: { ping: new Date(1583398874724) } }, upsert: true, writeConcern: { w: “majority”, wtimeout: 15000 }, $db: “config” }’: NotMaster: Not primary while running findAndModify command on collection config.lockpings
and
2020-03-06T08:45:11.555+0800 D COMMAND [conn321719] assertion while executing command ‘createIndexes’ on database ‘config’ with arguments ‘{ createIndexes: “system.sessions”, indexes: [ { key: { lastUse: 1 }, name: “lsidTTLIndex”, expireAfterSeconds: 1800 } ], allowImplicitCollectionCreation: false, $clusterTime: { clusterTime: Timestamp(1583455507, 1), signature: { hash: BinData(0, 53B67F92D69C8BFBFE808B0127033E527960EC14), keyId: 6766524995490283521 } }, $configServerState: { opTime: { ts: Timestamp(1583455502, 2), t: 6 } }, $db: “config” }’: CannotImplicitlyCreateCollection{ ns: “config.system.sessions” }: request doesn’t allow collection to be created implicitly.
Run cmd:
use config
db.system.session.find() # is blank .
I think so memory’s sessions info cannot write collection “config.system.sessions” , so asserts.user are growing.
How should I solve this problem?
Thanks!