Error
Error Code: 311

MongoDB Error 311: Transaction Canceled by Coordinator

📦 MongoDB
📋

Description

Error 311, 'Transaction Coordinator Canceled', indicates that a multi-document transaction initiated on a MongoDB replica set or sharded cluster was aborted by the transaction coordinator. This typically occurs when the transaction fails to complete within its allowed lifetime or encounters underlying issues during its commit phase.
💬

Error Message

Transaction Coordinator Canceled
🔍

Known Causes

4 known causes
⚠️
Transaction Timeout Exceeded
The multi-document transaction exceeded its configured `transactionLifetimeLimitSeconds` before completing, leading the coordinator to cancel it automatically.
⚠️
Network Connectivity Issues
Temporary network interruptions or failures between the client, `mongos` instances, or replica set members disrupted the transaction's commit process.
⚠️
Coordinator Node Failure
The `mongos` instance or primary node acting as the transaction coordinator failed over or was shut down unexpectedly during the transaction's lifetime.
⚠️
System Resource Constraints
High CPU, memory, or I/O load on the MongoDB cluster or transaction coordinator might have caused delays leading to transaction cancellation.
🛠️

Solutions

Coming Soon

Detailed step-by-step solutions for this error are being prepared. In the meantime, try these general troubleshooting tips:

General Troubleshooting Tips

  • Check the error message carefully for specific details
  • Review recent changes that might have caused the error
  • Search for the exact error code in the official documentation
  • Check log files for additional context
  • Try restarting the application or service
🔗

Related Errors

5 related errors