Firebase 函数 - 您已超出部署配额 [英] Firebase Functions - You have exceeded your deployment quota

查看:16
本文介绍了Firebase 函数 - 您已超出部署配额的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个包含 70 多个函数的 Firebase Functions 项目.它在节点 8 上运行.

经过 5-7 次完整部署后,出现错误:

您已超出部署配额,请使用 --only 标志批量部署您的功能,并等待几分钟再部署.转到 https://firebase.google.com/docs/cli/#deploy_specific_functions 了解更多信息

不清楚这是什么原因?我达到了哪个极限?配额何时更新?

几分钟后部署不工作.

解决方案

我已经在 Firebase Community slack 上寻求帮助,现在我明白发生了什么.谢谢,@katowulf.

配额如下所述:

在 0:00 UTC-07:00 左右将配额重置为 0,并且我的函数已部署到 us-central1.所以一天似乎有一个固定的时间段(它不是最后 24 小时移动窗口).

对于较大的项目,您不应一次部署整个项目,而应仅部署链接中描述的单个功能 https://firebase.google.com/docs/cli/#deploy_specific_functions

I have a Firebase Functions project with 70+ functions. It runs on Node 8.

After 5-7 full deployments I am getting an error:

You have exceeded your deployment quota, please deploy your functions in batches by using the --only flag, and wait a few minutes before deploying again. Go to https://firebase.google.com/docs/cli/#deploy_specific_functions to learn more

It is not clear what is the reason for that? Which limit I have reached? When quota will renew?

Deployment is not working after a few minutes.

解决方案

I have asked for help on Firebase Community slack and now I understand what has happened. Thanks, @katowulf.

Quotas are described here: https://firebase.google.com/docs/functions/quotas#quota_limits_for_firebase_cli_deployment

We have 3 quotas related to deployment which are:

  1. API calls (READ) - 1 call per deployment, no matter how many functions
  2. API calls (WRITE) - 1 call per function
  3. Max build time - A few minutes per function depending on size

To see which one you have hit you can go to quotas admin: https://console.cloud.google.com/projectselector2/projectselector/iam-admin/quotas?service=cloudfunctions.googleapis.com&usage=ALL&supportedpurview=project

In my case, I have hit quota 3. Max build time which is limited to 12000 seconds per day (by default). After some experiments, I have noticed that one function deploy adds around ~70 sec to build time (might be a different number in your case!). So 12000/70 gives around 170 functions deploys per day.

On Quotas admin page (second link) you can ask to increase any quota with Edit Quota option. 36000 sec build time is available without any additional approvals which in my case increased individual functions deploys number to 500+ per day.

A quota was reset to 0 around 0:00 UTC-07:00 and my functions are deployed to us-central1. So day seems to have a fixed time slot (it is NOT last 24h moving window).

For bigger projects, you should not deploy the whole project all at once, but just individual functions like described in a link https://firebase.google.com/docs/cli/#deploy_specific_functions

这篇关于Firebase 函数 - 您已超出部署配额的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆