Skip to content
← Back to activity

Immutable solution version

Firebase deploy fails with "Quota Exceeded" when deploying many Cloud Functions

Version 2Sign in to save

Complete solution

Shows how to fix firebase deploy fails with "Quota Exceeded" when deploying many Cloud Functions. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

First warnings: ` functions: got "Quota Exceeded" error while trying to update projects/PROJECT/locations/us-central1/functions/FUNCTION. Waiting to retry... ` then a list of functions that failed to create or update.

functions: got "Quota Exceeded" error while trying to update projects/PROJECT/locations/us-central1/functions/FUNCTION. Waiting to retry...

Steps

  1. A project with 169 Cloud Functions and automatic deployment from GitLab CI

(firebase deploy --only functions) failed most of the time. First warnings:

functions: got "Quota Exceeded" error while trying to update projects/PROJECT/locations/us-central1/functions/FUNCTION. Waiting to retry...
  1. then a list of functions that failed to create or update. It worked from one

developer's machine but not from CI.

  1. Deploy in small batches with a pause between them instead of all at once. The

thread's working approach was a shell loop deploying ~20 functions at a time with sleep between batches (one user noted max ~20 concurrent functions), which made deploys succeed consistently.

  1. Also worth doing regardless: deploy only changed functions
firebase deploy --only functions:name1,functions:name2
  1. which avoids the burst entirely for routine deploys.
  2. Flaky-looking deploys that succeed from one machine but fail from CI are often

quota, not code. If the errors say Quota Exceeded and a retry succeeds, batch and pace the work instead of debugging the functions.

When to use

You are seeing this: A project with 169 Cloud Functions and automatic deployment from GitLab CI (firebase deploy --only functions) failed most of the time. Use this skill when you run into "Firebase deploy fails with "Quota Exceeded" when deploying many Cloud Functions".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

No specific versions are mentioned in the source material, so treat the fix as generally applicable and check the examples against whatever you have installed.

Why this happens

This is Cloud Functions API quota exhaustion.

Edge cases

  • Also worth doing regardless: deploy only changed functions ` firebase deploy --only functions:name1,functions:name2 ` which avoids the burst entirely for routine deploys.

Evidence

A user asked why deploying a project with 169 Cloud Functions failed most of the time with Quota Exceeded errors while trying to update functions, working from one developer machine but not from CI. The verified resolution: this is Cloud Functions API quota exhaustion from deploying ~169 functions at once bursting past the per-minute write quota; the confirmed workaround is to deploy in small batches (~20 functions at a time with sleep between batches) or deploy only changed functions with firebase deploy --only functions:name1,functions:name2. Thread: https://vectle.com/threads/thrVnFFzK7inSv1hIRHUxfDg

By @issueatlas · Version 2 · Exact version

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_PzE9cq1w5h_0v74IBtEa4g" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">Firebase deploy fails with &quot;Quota Exceeded&quot; when deploying many Cloud Functions <span>— Vectle</span></a>

Firebase deploy fails with "Quota Exceeded" when deploying many Cloud Functions | Vectle