Help for owners
My Firebase bill suddenly became very high
Short answer
A Firebase bill rises when the app does more reads, writes, storage or network traffic than before. Firestore charges for each document read, including every document a query returns, so one inefficient screen or a loop can multiply the cost. Check usage in the console first, then have the code reviewed.
Does this sound like your situation?
- The invoice is much higher than last month.
- Usage graphs show a spike in reads, with the same number of users.
- Costs grew after a new feature or release.
- A cloud function seems to run again and again.
Why does this happen?
Every document read is billed
Firestore bills for document reads, writes and deletes, index entries read for queries, stored data and network bandwidth. A query is charged for the documents and index entries read to answer it, and each query costs at least one read even when it returns nothing.
Confirmed by firebase.google.com
Skipped results still cost
Using an offset charges for every skipped document. Cursors are cheaper than offsets for paging through long lists.
Confirmed by firebase.google.com
Loops and fan-out in the code
Firebase advises checking for unbounded queries and for Cloud Functions chains that fan out or loop without end, since both can multiply usage quickly.
Confirmed by firebase.google.com
Nobody was watching
Usage can be monitored in the Firebase console and budgets can be set up in Google Cloud, but only if somebody turned them on.
Confirmed by firebase.google.com
What can I do about it today?
- Open the usage pageIn the Firebase console, open Firestore, then Usage, and look at the last few weeks. Note which kind of usage went up: reads, writes, storage or network.
- Note what changed around that dayA new release, a new feature, a marketing push or an import. Write the date next to the jump.
- Set a budget alertIn Google Cloud, create a budget with email alerts. Alerts tell you about spending; the budget page itself says it does not cap usage on its own.
- Do not delete data or switch off services to save moneyDeleting collections or turning off a service can lose customer data and cannot be undone. Ask first.
- Send the findings to a developerSend screenshots of the usage graphs and the date of the jump, so the review starts at the right place.
When should I bring someone in?
- The bill keeps climbing with no change in users.
- You cannot tell which screen or function causes the reads.
- You are not sure it is safe to change anything.
How do I handle it?
- Read the bill line by lineI open the billing report and group the cost by service, so you see which line grew and when.
- Trace it to the codeI connect each expensive line to the part of the app that causes it, using logs and usage graphs.
- Fix the biggest cause firstI change one thing at a time, behind a backup, and compare usage before and after.
- Set up alertsI add budget alerts so a rise reaches you early, and I explain in writing what each one does and does not do.
The price depends on what I find, so I quote in writing after a short discovery call. Tell me what is happening and I reply within 24 hours.
What do owners ask about this?
Can I put a hard limit on the bill?
Firebase says budget alerts do not pause services. A spend cap exists for certain Firebase services only, and it pauses a service when it reaches its limit, which can also stop your app.
Will it cost less to move off Firebase?
Not automatically. First I find which usage is wasteful; moving is a separate decision with its own cost.
Can you promise a lower bill?
No. I find and remove the causes I can prove, and I show the usage before and after.
Sources
How was this page made?
I drafted this page with AI assistance from the official documents listed under Sources. Found a mistake? Tell me.