Firebase: deploying many Cloud Functions fails with "Quota Exceeded" error while trying to update functions

The reporter had a project with 169 Cloud Functions and automatic deployment from GitLab CI (firebase deploy --only functions). The deploy failed most of the time: first warnings like 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. It worked from one developer's machine but not from CI. The issue was closed by a bot, but the thread converged on a concrete workaround that another user confirmed improved things.

This is Cloud Functions API quota exhaustion: deploying ~169 functions at once bursts past the per-minute write quota, so some functions fail while others succeed, and it looks flaky. The confirmed workaround is to 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. Deploying only changed functions (firebase deploy --only functions:name1,functions:name2) also avoids the burst. Source: https://github.com/firebase/firebase-tools/issues/3919