Good day [Recipient redacted].
I hope you're doing well, and thanks for writing in.
I see that you’re getting errors using
Google Sheets API, specifically an error that reads, “Quota Error: Number of recent failed reporting API requests is too high, please implement exponential back off.”
This error occurs when you’re hitting limits and quotas for API request. The purpose of these limitations is to protect the system from receiving more data than it can handle, which ensures an equitable distribution of the system resources since GA is used by millions of sites and apps.
Generally, we have the following quotas that apply:
- 50,000 requests per project per day, which can be increased.
- 10 queries per second (QPS) per IP address.
○ In the
API Console, there is a similar quota referred to as Requests per 100 seconds per user. By default, it is set to 100 requests per 100 seconds per user and can be adjusted to a maximum value of 1,000. But the number of requests to the API is restricted to a maximum of 10 requests per second per user.
○ If your application makes all API requests from a single IP address (i.e., on behalf of your users), use the userIP or quotaUser parameter with each request to get full QPS quota for each user. See the
standard query parameters summary for details.
To prevent this error from showing in your reports, I recommend periodically retrying a failed request over an increasing amount of time, also known as
Exponential Backoff. You can follow the flow for implementing simple exponential backoff mentioned
here.
I hope this helps. Feel free to let me know if you need further clarification ―I’ll be happy to help. You may also chat with us anytime for other concerns.
Cheers,
Frank