Short answer
Find the document everyone writes to, such as a likes counter or a stats doc. Replace read-then-write transactions with increment(), split hot counters into shards, and keep transactions short. Retry ABORTED writes with exponential backoff.
Rather not fix it yourself? App Fix Ticket fixes one reproducible bug at a fixed price, with an optional Diagnosis that is credited toward the fix.
Why Firestore aborts the write, and the fix
01
One document gets too many updates
“A document receiving too many updates per second.” Google Cloud, Error codes (ABORTED)
A counter, a leaderboard or a shared settings doc written by every user hits the per-document write rate. Split it into shards and add them up when you read.
02
A transaction reads before every write
“A function calling a transaction (transaction function) might run more than once if a concurrent edit affects a document that the transaction reads.” Firebase, Transactions and batched writes
A transaction that reads a counter and writes it back collides with every other user doing the same. increment() changes the number without a read.
import { doc, updateDoc, increment } from 'firebase/firestore'; await updateDoc(doc(db, 'posts', postId), { likes: increment(1) });03
Writes go to a narrow range of IDs
“Avoid high read or write rates to lexicographically close documents, or your application will experience contention errors.” Firebase, Best practices
IDs that always increase, like order1, order2 or timestamp-based IDs, put new writes next to each other. Let Firestore create IDs with add() or doc() with no ID.
04
Traffic jumped suddenly
“We recommend starting with a maximum of 500 operations per second to a new collection and then increasing traffic by 50% every 5 minutes.” Firebase, Best practices (500/50/5 rule)
A launch or import that goes from zero to thousands of writes a second can hit ABORTED while Firestore scales. Ramp up over minutes, and retry with backoff.
Checked against the vendor’s docs on : Google Cloud docs: Firestore error codes; Firebase docs: Transactions and batched writes; Firebase docs: Best practices; Firebase docs: Distributed counters.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- from $450App Fix TicketOne reproducible bug. The Fix costs $1,200. If you need a Diagnosis first, its $450 fee counts toward the Fix.See scope and start
- from $450AI-Built App RescueFor a whole-app review, the $450 Launch Check is credited toward the optional $1,950 Rescue Sprint for up to five critical or high findings.No issues worth fixing, no charge. If the Launch Check finds nothing rated medium or higher, Simon refunds the full $450. You keep the report either way. This applies to the first 10 Launch Checks bought after October 30, 2026.See scope and start
“Very responsive, attentive to fixing bugs, and completed the project as needed! Thank you!”
Related: Firestore DEADLINE_EXCEEDED · Firestore transaction too big · Firestore quota exceeded · Firestore document too large