Short answer
Open Usage and billing in the Firebase console settings to see which product grew, then that product’s Usage tab for the day it started. Look for a query with no limit, a listener that reloads data, or a Cloud Function that writes to the document that triggered it (for Gemini charges, see the API key page linked below). Fix that code first. Then set an alerts-only budget on the project and spend cap budgets on the services that support them, because an alert email doesn’t stop anything by itself.
Where the spend comes from, and the fix
01
Find the service that grew
“Cloud Firestore and Cloud Storage usage are calculated daily.” Firebase, Avoid surprise bills
Settings > Usage and billing in the Firebase console shows the project’s usage against the no-cost quota, and many products have their own Usage tab with date ranges. Start with the product whose line jumped and the day it jumped, then look at what was deployed that day. Firestore and Storage usage is calculated daily and Cloud Functions monthly, so a function loop can show up late.
02
A query with no limit
“Forgetting to add a limit to a database query with millions of results” Firebase, Avoid surprise bills
Firestore charges for every document a query returns, so a screen that loads a whole collection gets more expensive as the collection grows. Add limit() and paginate with a cursor.
query(collection(db, 'orders'), orderBy('createdAt', 'desc'), limit(20))03
Realtime listeners on busy data
“When you listen to the results of a query, you are charged for a read each time a document in the result set is added or updated.” Firebase, Understand Cloud Firestore billing
A listener is charged a read for every document added or updated in its results, for each listener that is open. Listen to a narrow query, detach listeners when a screen closes, and use a one-time get() where live updates aren’t needed.
04
A Cloud Function that triggers itself
“Any time you write to the same document that triggered a function, you are at risk of creating an infinite loop.” Firebase, Cloud Firestore triggers
A Firestore trigger that writes back to the same document runs again on its own write, and can keep going. Exit early when the value is already correct, or write to a different document.
05
The budget only sent an email
“Budget alerts do not pause services.” Firebase, Avoid surprise bills
An alerts-only budget emails you and keeps everything running. Spend cap budgets pause a service at 100% of its budget for the rest of the month, but only some Firebase services support them. Set both. Firebase also suggests budget notifications that disable billing on the project, which stops everything, so weigh that against downtime.
Checked against the vendor’s docs on : Firebase docs: Avoid surprise bills; Firebase docs: Understand Cloud Firestore billing; Firebase docs: Cloud Firestore triggers; Firebase docs: Set up advanced billing alerts and logic.
Rather hand it over?
Fixed scope, fixed price, paid upfront. The work happens in writing; no call needed.
- $750Firebase Cost-Cut AuditWhere your Firebase or Google Cloud bill goes, with savings ranked by dollars a month and risk.See scope and start
- from $450App Fix TicketOne reproducible bug in an existing mobile or web app, diagnosed and fixed.See scope and start
Related: Unexpected Gemini API charges on Firebase · Firestore quota exceeded · Firebase Functions memory limit exceeded · How to cut your Firebase bill