Quotas?

1,715 views
Skip to first unread message

F B

unread,
Apr 9, 2019, 8:36:57 AM4/9/19
to AdWords API and Google Ads API Forum
I am trying to upload roughly 15000 keywords (aka adgroupcriteria).

However, I keep getting an "google.api_core.exceptions.ResourceExhausted: 429 Resource has been exhausted (e.g. check quota)" error. I tried chunking the number of operations and upload them in chunks of 1000 or 500, but keep getting the same error.
Where can I find more details about which kind of quota I actually exhausted?

Cheers
Fabian

googleadsapi...@google.com

unread,
Apr 9, 2019, 2:22:42 PM4/9/19
to fbo...@gmail.com, AdWords API and Google Ads API Forum
Hi Fabian, 

The QuotaCheckError.RESOURCE_EXHAUSTED will occur if you are sending too many requests in a short period of time. There is no scope for this error but rather the server will throw this error once it detects that your request has exceeded the system frequency limit. The best solution to this is to set up short delays between requests or combine more operations in fewer requests. Please refer to the Best practices guide to optimize the performance. If you're still facing an issue, could you please share the API request and response logs to check this further?

Thanks,
Bharani, Google Ads API Team

F B

unread,
Apr 9, 2019, 5:32:35 PM4/9/19
to AdWords API and Google Ads API Forum
Hi Bharani,

I did all that while trying to troubleshoot:
Even applied for standard access token. But to no avail. This is really very hard to debug as I have no idea what rate limit I am actually exceeding. Feels like I am fishing in the dark here ...

Cheers
Fabian

F B

unread,
Apr 10, 2019, 5:22:34 AM4/10/19
to AdWords API and Google Ads API Forum
I now decomposed the request into fewer operations (10 per chunk). So that the response won't be cut off.

After 2 chunks of 10 mutate operations each I get

"google.ads.googleads.v1.errors.googleadsfailure-bin": "\n0\n\u0002X\u0002\u0012*Too many requests. Retry in 12411 seconds.",

-> Retry in 12411 ~3 hours ???? After 2 requests?

What am I missing here? Because this way the API is not of any use to me.

Cheers
Fabian

F B

unread,
Apr 10, 2019, 5:45:21 AM4/10/19
to AdWords API and Google Ads API Forum
Okay, I think I finally understand.

The documentation is missleading/wrong when it comes to limits:

Ads: In the Ads Api Access Level and Permissible Use it is stated that for Basic access, one has:
  • Daily Request Limit: 15,000 requests / day (should be 15,000 operations)
  • Daily Get Limit: 1000 requests / day
Adwords: In the Adwords Api Access Level and Permissible Use is is stated that for Basic access, one has:
  • Daily Operational Limit: 10,000 operations / day
  • Daily Report Request Limit: 1,000 requests / day
I think that it actually should state operations for the Ads Api and not requests for the Daily Request limit. In the Ads rate sheet the terminology is actually correct as it says operations instead of requests there.

googleadsapi...@google.com

unread,
Apr 10, 2019, 11:46:43 AM4/10/19
to fbo...@gmail.com, AdWords API and Google Ads API Forum
Hello Fabian, 

Thank you for pointing this out. I have shared this feedback with the team. Please share the API SOAP logs if you still need assistance with the previous issue. 

Regards,

F B

unread,
Apr 10, 2019, 1:49:19 PM4/10/19
to AdWords API and Google Ads API Forum
SOAP logs? :) I thought one of the major selling points of the new Ads API was Rest instead of SOAP?

googleadsapi...@google.com

unread,
Apr 10, 2019, 4:44:08 PM4/10/19
to fbo...@gmail.com, AdWords API and Google Ads API Forum
Hello Fabian, 

Apologize for the confusion. I was referring to the Request and Response logs which triggered the error.

Thanks,

F B

unread,
Apr 19, 2019, 7:57:02 AM4/19/19
to AdWords API and Google Ads API Forum
The text below has been merged into this topic, although it is only related by name.

I was curious if there is any news on my question below.
 
Although we do have Standard access and should thus have unlimited daily operations limits I am getting a ResourceExhausted Error. 
We saw this kind error before when we only had Basic Access and were therefore limited to 15000 operations a day.
My strong hypothesis is that there are still daily limits for operations the standard account behind the scene because when chunking my operations to smaller chunk sizes (10), the first two or three chunks would go through and I would see the ResourceExhausted Error only on the third chunk. However, when running one big chunk with couple of hundred operations, I would get the error on the first try.
Could somebody please check if these limits are in place?

Surprisingly enough I get an error that would indicate, that my request frequency is too high, which certainly is not the case (as I waited 15 minutes).
Headers: {
  "google.ads.googleads.v1.errors.googleadsfailure-bin": "\n1\n\u0002X\u0004\u0012'Too many requests. Retry in 30 seconds.\u001a\u0002*\u0000",
  "grpc-status-details-bin": "\b\b\u0012/Resource has been exhausted (e.g. check quota).\u001az\nCtype.googleapis.com/google.ads.googleads.v1.errors.GoogleAdsFailure\u00123\n1\n\u0002X\u0004\u0012'Too many requests. Retry in 30 seconds.\u001a\u0002*\u0000",
  "request-id": "<xxx>"
}

googleadsapi...@google.com

unread,
Apr 19, 2019, 3:12:57 PM4/19/19
to fbo...@gmail.com, AdWords API and Google Ads API Forum
Hello,

I am from the Google Ads API team. Responding on this thread as Bharani is out of office. Could you please confirm that it is only you making calls to that account? If you are facing the error even after following the best practices and introducing delays, please provide the complete logs to investigate further.

Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

F B

unread,
Apr 23, 2019, 9:38:19 AM4/23/19
to AdWords API and Google Ads API Forum
Hi there,

yes I can confirm that it is only myself who is making the calls. I am doing indeed both following the best practices and introducing delays. I am not quite sure what you need in terms of logs. I can give you a request id if that helps after triggering the error again.

However, I am wondering if it might be easier for you to just look something up.

It appears that when one starts going too fast, the response header message contains a suggestion to wait X (initially somewhere between 2 and 5) seconds and then try again. This number X will continuously grow up to a limit of 30 seconds if one is not waiting as suggested.
Now my question is, is the 30 maybe a visual representation of a much larger number?

Also is it possible at all the obtain the time from the request response header that one should wait until retrying?

Cheers
Fabian

googleadsapi...@google.com

unread,
Apr 23, 2019, 3:02:39 PM4/23/19
to AdWords API and Google Ads API Forum
Hello Fabian,

Please share the request id using reply privately to the author option to investigate further. The wait time is shown in the error message only but not on the request/response headers.


Regards,
Sai Teja, Google Ads API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:

http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

F B

unread,
Apr 24, 2019, 5:35:16 AM4/24/19
to AdWords API and Google Ads API Forum
For everybody else stumbling across this topic. This is the result of a python script, where in the response header (in bold below) I would see that I am supposed to wait 30 seconds. I have two problems with this:
  1. this waiting period information is not available in the actual error (i.e. grpc response)
  2. the suggested waiting time is not correct, because even after waiting 15 minutes, I get the same error.

Method: /google.ads.googleads.v1.services.AdGroupAdService/MutateAdGroupAds
Host: googleads.googleapis.com:443
Headers: {
 
"developer-token": "REDACTED",
 
"login-customer-id": "ACCOUNT_ID",
 
"x-goog-api-client": "gl-python/3.6.8 grpc/1.20.0 gax/1.9.0 gapic/1.3.1"
}
Request: {
 
"customerId": "CUSTOMER_ID",
 
"operations": [
 
{
     
"create": {
       
"status": "ENABLED",
       
"adGroup": .... data ....
       
"ad": {
         
"finalUrls": [
           
.... data ....
         
],
         
"type": "EXPANDED_TEXT_AD",
         
"expandedTextAd": {
               
..... data .....
         
}
       
}
     
}
   
}
   
{
     
"create": {
       
"status": "ENABLED",
       
"adGroup": .... data ....
       
"ad": {
         
"finalUrls": [
           
.... data ....
         
],
         
"type": "EXPANDED_TEXT_AD",
         
"expandedTextAd": {
               
..... Data .....
         
}
       
}
     
}
   
}
 
]
}


Response
-------

Headers: {
 
"google.ads.googleads.v1.errors.googleadsfailure-bin": "\n1\n\u0002X\u0004\u0012'Too many requests. Retry in 30 seconds.\u001a\u0002*\u0000",
 
"grpc-status-details-bin": "\b\b\u0012/Resource has been exhausted (e.g. check quota).\u001az\nCtype.googleapis.com/google.ads.googleads.v1.errors.GoogleAdsFailure\u00123\n1\n\u0002X\u0004\u0012'Too many requests. Retry in 30 seconds.\u001a\u0002*\u0000",

 
"request-id": "REQUEST_ID_XXX"
}
Fault: {
 
"created": "@1556098154.918022000",
 
"description": "Error received from peer ipv4:xxxxxxxxxx",
 
"file": "src/core/lib/surface/call.cc",
 
"file_line": 1041,
 
"grpc_message": "Resource has been exhausted (e.g. check quota).",
 
"grpc_status": 8
}

googleadsapi...@google.com

unread,
Apr 25, 2019, 9:14:24 AM4/25/19
to fbo...@gmail.com, AdWords API and Google Ads API Forum
Hello Fabian,

Sorry for this inconvenience. 
I've passed this information to the engineering team for further checking.
We'll keep you updated once we have know anything more.

Best,
Thanet, Google Ads API Team

=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    https://ads-developers.googleblog.com/search/label/google_ads_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
 
You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads API Forum" group.
To post to this group, send email to adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en
---
You received this message because you are subscribed to the Google Groups "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/d9841e3c-0a79-4170-ab52-1b30573e0804%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages