MongoDB pinging failed for distributed lock pinger caused by WriteConcernFailed:waiting for replication timed out. Error details: { wtimeout: true }

mongodb

W SHARDING [replSetDistLockPinger] pinging failed for distributed lock pinger :: caused by :: WriteConcernFailed: waiting for replication timed out. Error details: { wtimeout: true }

In my MongoDB logs i found these kind of error at particular time (18:21 -18:39)on all primaries and secondaries in my replica set and config servers what causes this kind of issues & will it effect to the cluster and whats the solution to resolve this kind of issue

Best Answer

Your SECONDARY nodes are lagging on replication and your write concern dictates that write to the database should be acknowledged with X nodes, but before the system got enough acks, there was write timeout.

Check rs.printSlaveReplicationInfo() on all replica sets during time when you have hight load.