超过了 Google 日历的速率限制 [英] Rate Limit Exceeded Google Calendar

查看:29
本文介绍了超过了 Google 日历的速率限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在使用 Google Cloud 实例 (AppEngine) 为我们的用户与他们的 Google 日历同步数据(通过日历 API).基本上,我们提供了一个任务管理解决方案,任务应该与他们(用户)提供给我们访问的日历同步(单向).

We are using Google Cloud instances (AppEngine) to synchronize data for our users with their Google Calendars (through the Calendar API). Basically, we provide a task management solution and the tasks should be synchronized (unidirectional) with the calendars they (the users) provide us access for.

它是如何运作的:1. 我们要求用户授予对其 Google 帐户的访问权限.2. 我们要求他们选择所需的日历或提供在其帐户下创建新日历的可能性.3. 我们通过 API 推送插入/更新/删除.

How it all works: 1. We ask the users to grant access to their Google Account. 2. We ask them to select the desired calendar or offer the possibility of creating a new one under their account. 3. We push inserts/updates/deletes through the API.

我们不明白的具体错误是 403Rate Limit Exceeded",我们在过去 30 天内收到了 190 次,共 84,773 个请求.

The specific error we don't understand is 403 "Rate Limit Exceeded", which we received 190 times in the last 30 days from a total of 84,773 requests.

"error": {
 "errors": [
 {
 "domain": "usageLimits",
 "reason": "rateLimitExceeded",
 "message": "Rate Limit Exceeded"
 }
 ],
"code": 403,
"message": "Rate Limit Exceeded"
}
}

我们不明白的原因是我们每天进行的最大查询数约为 8K.我们在 Google Cloud API 设置中的每日上限为 100 万.

The reason we don't understand is because the maximum number of queries/day we have made is around 8K. The maximum daily limit we have in the Google Cloud API setting is 1 million.

我们还需要注意其他任何限制吗?如果不是,可能是什么导致了这个问题?有没有人遇到过类似的情况?

Are there any other limits we need to be aware of? If not, what could be causing the issue? Did anyone face a similar scenario?

谢谢!

推荐答案

速率限制错误 与每日使用限制错误不同.速率限制是一种安全限制,以确保我们不会在短时间内收到大量请求.

The rate limit error is not the same as the daily usage limit error. The rate limit is a safety limit to ensure we are not bombarded with requests over a short period of time.

您可以使用指数退避重试算法来确保速率限制不会阻止您的应用陷入困境(相反,它只会减慢速度).

You can use exponential backoff retry algorithms to ensure rate limit doesn't stop your app dead in the water (instead it just slows it down).

这篇关于超过了 Google 日历的速率限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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