Error
Error Code: 267

MongoDB Error 267: Active Prepared Transaction Detected

📦 MongoDB
📋

Description

This error indicates that an operation attempted to start or modify a prepared transaction, but another prepared transaction is already active within the current session or context. It commonly arises in MongoDB sharded clusters when working with multi-document transactions, signifying a conflict in transaction state.
💬

Error Message

Prepared Transaction In Progress
🔍

Known Causes

3 known causes
⚠️
Concurrent Prepared Transaction Attempt
A new prepared transaction was initiated by the same session while another prepared transaction was already in an active or pending state.
⚠️
Application Transaction State Mismanagement
The application logic did not correctly manage the lifecycle of prepared transactions, leading to an overlapping or uncommitted state.
⚠️
Interrupted Transaction State
A previous prepared transaction may have been left in an intermediate 'prepared' state due to a client disconnect or network interruption.
🛠️

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