Implementing Exponential Backoff error message

385 views
Skip to first unread message

Nat S

unread,
Dec 8, 2016, 5:13:07 PM12/8/16
to google-analytics-spreadsheet-add-on
I have a report which i run very often in the GA Google Sheet add-in. it has 2 filters set up in the report. it is returning an error with a request that i implement Exponential back off. this is somewhat surprising since I've run this same report numerous times without running into any issues.

Philip Walton

unread,
Dec 9, 2016, 3:48:12 PM12/9/16
to Nat S, google-analytics-spreadsheet-add-on
What is the exact error message you're receiving? And what params are you querying for?

On Thu, Dec 8, 2016 at 2:13 PM, Nat S <naftolis...@gmail.com> wrote:
I have a report which i run very often in the GA Google Sheet add-in. it has 2 filters set up in the report. it is returning an error with a request that i implement Exponential back off. this is somewhat surprising since I've run this same report numerous times without running into any issues.

--
You received this message because you are subscribed to the Google Groups "google-analytics-spreadsheet-add-on" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-spreadsheet-add-on+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-analytics-spreadsheet-add-on/09e226eb-e994-4f56-ae8b-fe8eb0286e1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Arthur Dobelis

unread,
Sep 25, 2018, 2:24:23 PM9/25/18
to google-analytics-spreadsheet-add-on
We are having the same problem, and it's for a large batch of scheduled reports, scheduled using the Add-On's scheduler, that takes over an hour to run.

There appears to be a disconnect here: the Support representative acknowledges that we are using the Google Sheets API to make the requests, but it suggests that "we" implement exponential backoff, when we of course are not the provider of the add-on (Google is) and cannot therefore implement the rule that would pause the scheduled reports and thus "back off". It appears this is the generic response they give to people who experience this problem with the Add-On.

Questions for the group: 
  • Is there an automated way to batch-pause scheduled reports in the Add-On scheduler, so we can wait until our quotas are restored and re-run? 
  • Would that satisfy the "backoff" requirements mentioned in the automated support email?
Our operational problem here is that we are currently stuck waiting until the schedule completes before rerunning the reports. Waiting and rerunning usually works, but it gets in the way of delivering reports in a timely manner.

Email provided below for reference.

Arthur

SUPPORT EMAIL:

P3: Quota Errors in Google Sheets Google Analytics API
 
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.

For more information, you can check our developer guide about this.

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

Leah Ferguson

unread,
Jun 26, 2020, 8:31:11 AM6/26/20
to google-analytics-spreadsheet-add-on
Has anyone found a solution for this? I an encountering the same issue. I have a report set up using Google Sheets + the Google Analytics spreadsheet add on that is scheduled to run every morning, but as of yesterday I am getting the following error:

API call to analyticsreporting.reports.batchGet failed with error: Quota Error: Number of recent failed reporting API requests is too high, please implement exponential back off. See developer documentation for details at https://developers.google.com/analytics/devguides/reporting/core/v4/limits-quotas#reporting_apis_request_errors

Since I am relying on the sheets add on to pull the report, I am not actively writing scripts to pull in data, and wound't know how to implement exponential backoff as it is described in the support documentation. 

To unsubscribe from this group and stop receiving emails from it, send an email to google-analytics-spread...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages