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

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

问题描述

我们正在使用Google Cloud实例(AppEngine)将用户的数据与其Google日历同步(通过Calendar 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.

我们无法理解的具体错误是403超出速率限制",在过去30天内,我们收到了84,773个请求,共收到190次.

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天全站免登陆