MongoWriteConcernError
Node.jsMongoServerErrorwritereplicationconsistency
The write operation succeeded but the write concern could not be satisfied
What is happening?
MongoWriteConcernError means the write was applied to the primary but the requested write concern (e.g. w: 'majority') could not be satisfied within the wtimeoutMS period. The write IS persisted on the primary — this error indicates a replication acknowledgment issue, not a write failure.
Common causes
- One or more secondaries are down or unreachable
- Replication lag exceeds wtimeoutMS
- Write concern w value exceeds the number of available members
- Network partition between replica set members
- Secondary member in RECOVERING state