Understanding the Causes of the Gmail API User-rate limit exceeded Error

Asked 1 years ago, Updated 1 years ago, 118 views

I am using the GMail API, but User-rate limit exceeded occurs.
The API Manager does not seem to have exceeded the limit when calculating quota for both Daily Usage and Per User Rate Limit, based on the number of requests.
 エラーThe API method for send was not recorded for several days before the error occurred.

Are there any changes to the quota limit of the Gmail API and other influences from outside the API?

As for the criteria, regarding the hypothesis level, I made the following calculation decision.

If you look at the peak request status from the traffic data,
Assume you have a maximum of 30 requests per second, typically just under 20.

If you look at the API method type, it's 1 minute average, but
messages.get:27.617 cases
messages.list: 0.6167 cases
history.list: 0.1167 cases
labels.list:0.2667 cases
getProfile: 0.1167 cases
messages.delete —0 (approximately once every two days)
messages.modify —0 (approximately once a day)
messages.send —0 (approximately twice a day)

For each quota, the following
messages.get:5
messages.list:5
history.list:2
labels.list:1
getProfile:1
messages.delete:10
messages.modify:5
messages.send:100

From the above, if you add 30 items with get, you will get 150 quota per second. Even if one send and one delete are added, it will be 250 quota.
We have determined that the API quota limit is not exceeded for seconds.

The quota limit of daily requests from the total number of requests per day is not the cause, but
I think it's because of the quota limit of seconds, but

for the most part, we only run messages.get. User-rate limit exceeded is often present, so
I have a question.

Additional
In the API Manager dashboard, you can see "Queries per day" and "Queries per 100 second" on the GmailAPI Assignment screen, but there is still room for the upper limit.
Errors occur every day.

We call GmaiAPI every 5 minutes, and there are about 20 requests every 5 minutes.(316436 times for the current day)

api gmail

2022-09-30 19:11

1 Answers

Gmail API limits in addition to API calls

  • Mail Sending Limits
  • Bandwidth Limits
  • Concurrent Requests

is available.References

Of these, the top two are supposed to be User-rate limit exceeded when exceeded

Since there is very little transmission, I think it is Bandwidth Limits.

"If ""316,436 times per day"", the limit is about 8KB per session."


2022-09-30 19:11

If you have any answers or tips


© 2024 OneMinuteCode. All rights reserved.