Hello everyone,
We are facing an odd behaviour in our MongoDB cluster, which is causing slowness in the database.
We have a cluster running on Percona 7.0.28-15, and the cluster consist in 4 instances:
1 Primary node
2 Secondary nodes
1 Hidden Secondary
We have them on GCP under instance groups, so we can rotate/recreate the instance whenever we need to. However, while doing the rotation process, we have an increase in SlowQueries that are longer than usual waiting for the "MajorityWriteConcern”.
Our rotation process consists of issuing db.getSiblingDB(“admin”).shutdownServer() from the secondary, then recreating the instance that will automatically rejoin the cluster, and for the primary, we issue a stepDown before the shutdown server.
Could you help us to understand what is happening? See one of the full logs below. We get tons of it when rotating:
{
"t": {
"$date": "2026-01-08T14:28:24.589+00:00"
},
"s": "I",
"c": "COMMAND",
"id": 51803,
"ctx": "conn145",
"msg": "Slow query",
"attr": {
"type": "command",
"ns": "applicationStorage.$cmd",
"appName": "opgcore",
"command": {
"update": "###",
"ordered": "###",
"writeConcern": {
"w": "###",
"wtimeout": "###",
"j": "###"
},
"txnNumber": "###",
"$db": "###",
"$clusterTime": {
"clusterTime": "###",
"signature": {
"hash": "###",
"keyId": "###"
}
},
"lsid": {
"id": "###"
}
},
"numYields": 0,
"reslen": 245,
"locks": {
"ParallelBatchWriterMode": {
"acquireCount": {
"r": 2
}
},
"FeatureCompatibilityVersion": {
"acquireCount": {
"w": 2
}
},
"ReplicationStateTransition": {
"acquireCount": {
"w": 3
}
},
"Global": {
"acquireCount": {
"w": 2
}
},
"Database": {
"acquireCount": {
"w": 2
}
},
"Collection": {
"acquireCount": {
"w": 2
}
}
},
"flowControl": {
"acquireCount": 1
},
"readConcern": {
"level": "local",
"provenance": "implicitDefault"
},
"writeConcern": {
"w": "majority",
"j": false,
"wtimeout": 10000,
"provenance": "clientSupplied"
},
"waitForWriteConcernDurationMillis": 100,
"storage": {},
"cpuNanos": 471426,
"remote": "172.20.0.100:37476",
"protocol": "op_msg",
"durationMillis": 100
}
}