Launch offer: everything is 100% off. Download any skill free, no sign-up. Get the skills
TechFixError fixesBill spiked
Bill spiked

Firebase bill spike

How it usually starts
A budget alert email, or a Cloud Billing report showing one product
(Firestore reads, Cloud Functions, Storage) far above normal.
Short answer

Find which product spiked, then stop the cause: usually a function that triggers itself, a query or listener reading far too much, or open security rules. Budgets on their own only alert; they don't stop spending.

Why it happens

Google Cloud is clear that an alerts-only budget does not cap usage or spending. Firebase lists the common causes of surprise bills: a database query with no limit over millions of documents, and Cloud Functions that fan out or loop forever (for example a function that writes to the same document that triggers it).

Open security rules and unprotected backends add a third cause: anyone can read or write your data at your expense.

Fix it by hand

  1. Find the product. In the Firebase console's usage and billing pages, or in Cloud Billing reports, see which service and which day spiked. Firestore and Storage usage is calculated daily; Cloud Functions usage monthly.
  2. Stop runaway functions. If a function is looping, disable or delete it now, then fix it: a trigger function should exit early when the change was made by itself (compare the before and after data, or write a marker field).
  3. Cap what can be capped. Firebase spend cap budgets pause a service for the rest of the month when it reaches 100% of its budget. Firebase lists them for Firebase AI Logic, App Hosting, Cloud Functions for Firebase and Extensions. Set them in the Firebase console or the Google Cloud console.
  4. For everything else, set alerts and an emergency brake. Budget alerts email you at thresholds. Google also documents using budget notifications (through Pub/Sub) to programmatically disable billing on a project. Without billing, the project's paid services stop, so use it as a last resort.
  5. Lock your rules. Make sure no Firestore, Realtime Database or Storage rule allows public read or write (for example allow read, write: if true;). Require sign-in and check ownership.
  6. Turn on App Check so only your app can call your backends, and add limit() to queries and detach listeners you no longer need.

Stop it happening again

Let TechFix do this for you

Bill Spiked $7

Bill Spiked flags self-triggering functions, unbounded queries, open endpoints and missing caps in your code, ranked by blast radius, and gives a spending-cap checklist for each provider it finds, Firebase and Google Cloud included.

  • Finds the uncapped calls, loops and open endpoints that run up a bill, ranked by how much damage each can do.
  • Adds the limits as diffs you approve, and gives a spending-cap checklist for each paid provider in your code.
  • Verdict first. Every finding shows the file and line, what it breaks, and the fix as a diff that is applied only with your OK.

Bill Spiked: how it works, with examples · Install guide

Works with Claude Code, Claude.ai, Cursor, Codex and other agents that read SKILL.md files. No installs, no accounts, works offline. No-questions refund.

Sources (checked 2026-10-13)