Transaction Limits
Parent: MongoDB Transactions · Published reference · snapshot 2026-10-15
↓ Facts as markdownall context files
Depth-first rabbithole dossier for Transaction Limits; source-anchored research pack.
These notes link each claim to its source. Some citations identify archived research reports that are no longer hosted on this site. A published reference means the content is available; it does not certify independent review or accuracy.Read the editorial policy and follow the sources before relying on a claim.
Measurements and reference values
- [low] In MongoDB 4.0, a transaction uses a single oplog entry limited to 16 MB, where update operations store incremental changes and inserts store full documents. (verified as of 2026-10-14) Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
Problems, failure modes and limitations
- [high] By default, MongoDB automatically aborts any multi-document transaction that runs for more than 60 seconds, a limit controlled by the transactionLifetimeLimitSeconds parameter. (verified as of 2026-10-14) Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md, https://www.mongodb.com/blog/post/performance-best-practices-transactions-and-read--write-concerns, https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern, https://severalnines.com/blog/transaction-considerations-mongodb-production/ [source]
- [medium] Transactions that exceed the lifetime limit are considered expired and will be aborted by a periodic cleanup process. Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md, https://www.mongodb.com/docs/manual/reference/parameters.md [source]
- [high] MongoDB 4.2 and later can split transaction writes across multiple oplog entries, removing the 16 MB single-entry limit, though each oplog entry must still be within the 16 MB BSON document size limit. (verified as of 2026-10-14) Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md, https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern, https://severalnines.com/blog/transaction-considerations-mongodb-production/ [source]
- [low] The threshold for retrying transactions that fail due to cache pressure is a percentage of the dirty cache size, with a default value of 0.75 (75%). Sources: https://www.mongodb.com/docs/manual/reference/parameters.md [source]
- [low] The server allows a maximum number of concurrently open multi-document transactions for external clients, aborting new transactions when this limit is reached. (verified as of 2026-10-14) Sources: https://www.mongodb.com/docs/manual/reference/parameters.md [source]
- [low] You cannot create new collections or indexes in a distributed transaction. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] Transactions cannot write to capped collections, and in MongoDB 5.0 and later, they cannot use the snapshot read concern to read from capped collections. (verified as of 2026-10-14) Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] In a transaction, you cannot read from or write to collections in the config, admin, or local databases. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] Transactions cannot write to system collections, such as collections in the system.* format. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] You cannot use getMore inside a transaction to read cursors created outside it, nor use getMore outside a transaction to read cursors created inside it. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] The first operation in a transaction cannot be a command such as killCursors or hello. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] You cannot run non-CRUD commands inside a transaction, including listCollections, listIndexes, createUser, getParameter, and count. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [high] If a transaction cannot acquire its required locks within the 5-millisecond default timeout, the transaction aborts with a write conflict. (verified as of 2026-10-14) Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md, https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] If a transaction is too large to fit in the WiredTiger cache, it aborts and returns a TransactionTooLargeForCache error. Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md [source]
- [low] Restoring with mongorestore --oplogReplay may fail if the oplog.bson contains a document exceeding the 16 MiB size limit, such as when transactions write many smaller documents that aggregate to this size. Sources: https://jira.mongodb.org/browse/SERVER-47408 [source]
Facts and statements
- [high] By default, transactions wait up to 5 milliseconds to acquire locks, a timeout controlled by the maxTransactionLockRequestTimeoutMillis parameter. (verified as of 2026-10-14) Sources: https://www.mongodb.com/docs/manual/core/transactions-production-consideration.md, https://www.mongodb.com/docs/manual/reference/parameters.md, https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [low] Transactions do not support the explain command. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
- [high] As a best practice, no more than 1,000 documents should be modified within a transaction; for larger batches, split into multiple transactions. (verified as of 2026-10-14) Sources: https://www.mongodb.com/blog/post/performance-best-practices-transactions-and-read--write-concerns, https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern [source]
Related concepts
- Transaction — is a part of Transaction Limits
Children
- No children recorded.