简体   繁体   English

Google Cloud Vision API返回“429 - 超出配额”

[英]Google Cloud Vision API returning “429 - Quota Exceeded”

I've had a Cloud Function that makes Vision API requests, specifically Document Text Detection requests. 我有一个云功能,可以提出Vision API请求,特别是文档文本检测请求。 My peak requests rate is usually around ~120-150 requests per minute on an average day. 我的峰值请求率通常在平均每天约120-150次请求。

I've suddenly been getting resource quota exceeded errors for Vision API requests with a request rate at 2500 requests per minute. 我突然遇到Vision API请求的资源配额超出错误,请求率为每分钟2500个请求。 Some things to note: 有些事情需要注意:

  • I've had no code changes in 3 months 我在3个月内没有更改代码

  • I deleted and redeployed the Cloud Function making these requests to stop any problematic image that was causing a runaway loop 我删除并重新部署了Cloud Function,使这些请求能够阻止导致失控循环的任何有问题的图像

  • My code calling the API nor the cloud functions themselves were getting retried so there really wasn't a way that I could exponentially increase my request rate overnight with no changes introduced. 调用API的代码和云函数本身都在重试,所以我没有办法在没有引入任何更改的情况下在一夜之间以指数方式提高请求率。

  • The service account making the Vision calls is making the normal amount of requests and is only in use by the cloud function ie not being used by someone's local script 进行Vision调用的服务帐户正在进行正常数量的请求,并且仅由云功能使用,即不被某人的本地脚本使用

I've since turned on retries to mitigate this issue since it'll "work" with exponential back off but this is expensive to do, especially with the vision API. 我已经开启重试以缓解这个问题,因为它会以指数退避的方式“工作”,但这样做很昂贵,特别是使用视觉API。 Is there anything I can do to find out the root cause of this issue? 我能做些什么来找出这个问题的根本原因吗?

To identify the specific quota being exceeded, Stackdriver API helps by using Monitoring quota metrics as explained here . 要确定具体配额被超过,为Stackdriver API有助于通过监控限额指标作为解释在这里

GCP lets you specify quota being exceeded in greater depth using the Stackdriver API and UI, with quota metrics appearing in the Metrics Explorer. GCP允许您使用Stackdriver API和UI更深入地指定超出配额,并在Metrics Explorer中显示配额指标。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谷歌云视觉 api 的处理速度(在配额下要少得多) - Processing speed in google cloud vision api (much less under quota) Stackdriver API 指标显示许多 429 错误,但未超出配额 - Stackdriver API metrics show many 429 errors, while quota is not exceeded Google Cloud Vision API返回Notting类型= TEXT_DETECTION - Google Cloud Vision API returning nothting for Type = TEXT_DETECTION 谷歌云资产 assets.list REST API 配额超出错误返回 - Google cloud asset assets.list REST API Quota exceeded error returned Google Cloud Console 上的项目 xxxx 超出了 TPU 配额 - TPU quota exceeded on project xxxx on Google Cloud Console 超出 Google Cloud 构建配额(构建和操作获取请求) - Google Cloud Build Quota exceeded (Build and Operation Get requests) 带有Google Cloud Storage的Google Vision API - Google Vision API with Google Cloud Storage Google Cloud Vision API 和 Mobile Vision 有什么区别? - What is the difference between Google Cloud Vision API and Mobile Vision? Google Cloud Vision api 的结果有限 - Limited results with Google Cloud Vision api 谷歌云视觉 API“PERMISSION_DENIED” - Google Cloud Vision API “PERMISSION_DENIED”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM