<!-- llms-explorer concept facts · https://llms-explorer.com/tree/transaction-limits/ · pack 2026-10-15 · ~2090 tokens -->

# Transaction Limits

> Depth-first rabbithole dossier for Transaction Limits; source-anchored research pack.

Parent: [MongoDB Transactions](https://llms-explorer.com/tree/mongodb-transactions/) · 3 facets · 19 facts · page: https://llms-explorer.com/tree/transaction-limits/

## 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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`

## 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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#troubleshooting`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#troubleshooting`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#troubleshooting`

## 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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [low] Transactions do not support the explain command. Sources: https://help.aliyun.com/en/mongodb/use-cases/transactions-and-read-write-concern — source: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#core`
- [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: `~/.global-ai-hub/research/.pipeline/mongodb-2026-10-14/frb/transaction-limits-7a8fb06882/rabbithole-synthesis.md#patterns`

## Related concepts

- Transaction — is a part of Transaction Limits
