A Firebase bill that triples overnight is a rotten surprise, and you are not the first founder to open one. Is your Firebase bill too high? It is usually one of five leaks, led by runaway Firestore reads, and most take days to fix, not a rebuild.
Below is how to find the leak yourself in under an hour. We also cover what to fix first and when a rebuild is justified. The last part explains how to protect yourself if your agency is part of the problem.
First 15 minutes: stop the bleeding
Before you diagnose anything, put a ceiling on the surprise. Create a budget with alerts at 50%, 90% and 100% in Google Cloud Billing. Budgets send alerts but do not cap spending on their own.
If you need a hard stop, you can wire a budget alert to Pub/Sub and a function that disables billing. Be clear about the trade-off. When billing turns off, your app goes down with it.
Then check your Firestore and Storage security rules. A rule like allow read, write: if true lets anyone with your project ID read your data and run up your bill. Close it today, even if the rest waits.
Is your Firebase bill too high? A one-hour diagnosis
You do not need a consultant for the first pass. You need the Google Cloud console, the Firebase console and your app running on a test device.
Step 1: Find the SKU (10 minutes)
Open Billing, then Reports, and group by SKU for the last 30 days. Every charge maps to a line such as Cloud Firestore Read Ops, Cloud Functions CPU Time or Cloud Storage egress.
Good: costs grew roughly in line with active users. Bad: one SKU makes up most of the bill and grew two or three times faster than your user count.
Step 2: Work out reads per active user (15 minutes)
Take daily reads from the Firestore usage tab in the Firebase console. Divide them by daily active users from Analytics. That ratio is the single most useful number in this whole exercise.
As a rough rule, a few hundred reads per active user per day is normal for a feed or chat app. Several thousand suggests a leak. Your app's shape matters, so compare against what a typical session should load.
Step 3: Line up spikes with deploys (20 minutes)
In Cloud Monitoring, chart Firestore document reads and function invocations over 30 days. Mark your release dates on the same timeline. A step change the day after a release points straight at that release's diff.
In the Functions dashboard, look for a function whose invocations climb with its own writes. That pattern usually means a trigger is firing itself.
Step 4: Watch the client (15 minutes)
Turn on Firestore debug logging, then open your three busiest screens. On the web SDK, that means calling setLogLevel('debug'). Count how many documents each screen pulls.
Then navigate away and come back. If the read count keeps climbing while you sit on one screen, listeners are not detaching.
If you want a second pair of eyes on the numbers, a free code or performance audit gets you a ranked list of what is actually costing you money.
The five most common causes, ranked
This ranking reflects how often we see each cause in rescue work. It is not an industry statistic.
- Unbounded queries and leaky listeners. A query with no limit() on a growing collection reads every document, every time. A listener set up in a React effect without a cleanup function attaches again on every render. Firestore also charges a listener as a new query if it has been disconnected for more than 30 minutes.
- Counting on the client. Some screens read 10,000 documents to show the number 10,000. Use the count() aggregation, which bills one read per batch of up to 1,000 index entries. A counter document maintained by a function also works.
- Cloud Functions loops and idle instances. A function that triggers on a write and then writes back to the same document can call itself thousands of times. Setting minInstances high keeps instances warm, and you pay for them while they sit idle.
- Storage egress from full-size images. Serving a 4 MB phone photo as a 200-pixel thumbnail costs you egress on every view. The Resize Images extension and sensible cache headers usually fix this in a day.
- Abuse and fraud. Open rules invite scraping. Phone sign-in can be hit by SMS pumping, where bots trigger codes to premium numbers. Turn on App Check and limit which countries can receive SMS codes.
Fix or rebuild?
Most bills come down with targeted fixes. A rebuild is justified far less often than people fear, and agencies sometimes recommend one too quickly.
It is a fix when
- The cost sits in one or two SKUs you can trace to specific screens or functions.
- The fix is a query limit, a listener cleanup, a guard clause or an image resize.
- The work fits in days to about two weeks, depending on how many screens are affected.
It is a partial rebuild when
- Your data is deeply relational and the client stitches together joins with dozens of reads per screen.
- Reporting or analytics queries run against Firestore instead of a warehouse.
- One large document per user is rewritten many times a minute.
In these cases, move the problem workload rather than everything. Reporting can go to BigQuery through the Firestore export extension. A relational core can move to Postgres on Cloud SQL, while auth and push notifications stay in Firebase.
It is a full rebuild when
The data model fights you on almost every feature, and your cost per user stays high after the fixes. Even then, we migrate in slices, one workload at a time, so the app keeps running.
If your agency relationship is failing
Sort out access before you tell anyone you are leaving. Once a relationship turns sour, getting credentials gets slower.
Technical checklist
- Your company account is an Owner on the Firebase and Google Cloud project.
- The billing account is in your company's name and paid with your card.
- The Git repository lives in your organisation, not the agency's.
- App Store Connect, Google Play Console, domain registrar and DNS are all under your accounts.
- You rotate service account keys and API secrets the day the agency's access ends.
Contract checklist
- IP transfers to you on payment, not when the project is complete.
- A handover clause requires architecture notes, environment setup and deploy steps.
- Credentials must be returned within a set window, such as two business days.
- There is a defined notice period with paid handover time.
What the first week of a rescue looks like
Our first week is about stopping losses and producing a plan you can act on, with or without us.
- Day 1: access review, budget alerts, security rules check and a freeze on risky deploys.
- Day 2: billing broken down by SKU, plus a baseline for reads per active user.
- Day 3: client and function profiling, ending in a ranked list of leaks with an estimated savings range for each.
- Days 4 and 5: ship the top one or two fixes behind feature flags, then watch the metrics for 48 hours.
- End of week: a written report with the fix-versus-rebuild call and the reasoning behind it.
We give savings as ranges, not promises. Usage keeps changing while you fix things, so a single number would mislead you.
FAQ
Can I set a hard spending cap on Firebase?
There is no built-in cap. Budgets only send alerts. You can script a function that disables billing when a budget is exceeded, but that takes your app offline.
Why are my Firestore reads so high with so few users?
Each document returned by a query counts as a read, so one unbounded query can cost thousands. Listeners that never detach and client-side counting are the usual culprits. Browsing data in the Firebase console also counts toward your reads.
Is Firebase more expensive than a traditional backend?
At small scale it is usually cheaper, because you pay little for servers or operations. Read-heavy apps with many daily users can end up costing more than Postgres behind an API. The access pattern matters more than the platform.



