Aborted (112): Too much contention on these documents. Please try again
或
Aborted (112): Aborted due to cross-transaction contention. This occurs when
multiple transactions attempt to access the same data, requiring at least one
to be aborted in order to enforce serializability.
[[["容易理解","easyToUnderstand","thumb-up"],["確實解決了我的問題","solvedMyProblem","thumb-up"],["其他","otherUp","thumb-up"]],[["難以理解","hardToUnderstand","thumb-down"],["資訊或程式碼範例有誤","incorrectInformationOrSampleCode","thumb-down"],["缺少我需要的資訊/範例","missingTheInformationSamplesINeed","thumb-down"],["翻譯問題","translationIssue","thumb-down"],["其他","otherDown","thumb-down"]],["上次更新時間:2025-09-04 (世界標準時間)。"],[],[],null,["# Understand error codes\n======================\n\nThis page lists error codes that you might encounter and provides suggestions\nfor how to fix each of them.\n\n### DeadlineExceeded (262)\n\nThe following can increase `DeadlineExceeded (262)` errors:\n\n- An increase in latency caused an operation to take longer than the deadline (60 seconds by default) to complete.\n\n DeadlineExceeded (262): Deadline exceeded.\n\nTo resolve this issue, see the [guide to troubleshooting latency](/firestore/mongodb-compatibility/docs/resolve-latency).\n\n### Aborted (112)\n\nThe following situations can increase `Aborted (112)` errors:\n\n- A document receiving too many updates per second.\n- Contention from overlapping transactions.\n- Traffic that increases rapidly or encounters hot-spots.\n\n Aborted (112): Too much contention on these documents. Please try again\n\nOr \n\n Aborted (112): Aborted due to cross-transaction contention. This occurs when\n multiple transactions attempt to access the same data, requiring at least one\n to be aborted in order to enforce serializability.\n\nTo resolve this issue:\n\n- For rapid traffic increases, Firestore with MongoDB compatibility attempts to automatically scale to meet the increased demand. When Firestore with MongoDB compatibility scales, latency begins to decrease.\n- Hot-spots limit the ability of Firestore with MongoDB compatibility to scale up. Review [designing for scale](/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#avoid_hotspots) to identify hot-spots.\n- Review [data contention in transactions](/firestore/mongodb-compatibility/docs/understand-reads-writes-scale#high-level_steps_in_a_write_transaction) and your usage of transactions.\n- Reduce the write rate to individual documents.\n\n### InvalidArgument (2)\n\nThe following situations can cause `InvalidArgument (2)` errors:\n\n- Attempting to commit a document with that exceeds the 7.5 KiB limit for an index entry.\n\n7.5 KiB is a [limit](/firestore/mongodb-compatibility/quotas) for index entries. You cannot exceed this limit\nand it's not a quota that can be adjusted. \n\n InvalidArgument (2): Index entry on \u003cvar class=\"readonly\" translate=\"no\"\u003efield_name\u003c/var\u003e is larger than 7680 bytes.\n\nTo resolve this issue:\n\nFor indexed field values, split the\nfield into multiple fields. If possible, create an un-indexed field\nand move data that doesn't need to be indexed into the un-indexed\nfield."]]