Resource getting exhausted even in the standard access level developer token

613 views
Skip to first unread message

Mayank Mangal

unread,
Sep 28, 2022, 5:33:17 AM9/28/22
to Google Ads API and AdWords API Forum
Hi team,

I am using google Ads REST API's searchStream method to fetch search terms data. I  am experiencing an issue saying resource_exhausted even when I am using developer token with standard access. 
According to this doc (https://developers.google.com/google-ads/api/docs/access-levels), there is unlimited access to the tokens with Standard access level. However, we are getting this issue. Mentioning here the exact error that I am getting as a response:

 { "error": { "code": 429, "message": "Resource has been exhausted (e.g. check quota).", "status": "RESOURCE_EXHAUSTED", "details": [ { "@type": "type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure", "errors": [ { "errorCode": { "quotaError": "RESOURCE_EXHAUSTED" }, "message": "Too many requests. Retry in 4 seconds.", "details": { "quotaErrorDetails": { "rateScope": "ACCOUNT", "rateName": "Requests per service per method", "retryDelay": "4s" } } } ], 
 "requestId": "AbXI0ljZWuRuXTaOaoTL5w" } ] } }

Can I get an exact idea regarding what are the limitations, so that I can fulfill them based on our needs and also follow the best practices of using the API?

Happy to share any more info regarding it, if needed.

Thanks,
Mayank Mangal




Google Ads API Forum Advisor

unread,
Sep 28, 2022, 11:34:44 AM9/28/22
to mayank...@pixis.ai, adwor...@googlegroups.com
Hi Mayank,

Thank you for reaching out to our API support team.

You can refer to our API limits and quotas and Rate limits guides for more information on the API limits you need to consider.

Also, so our team can further investigate and possibly raise this issue to the rest of our team, could you confirm if the issue persists? In addition, if the issue is still being encountered, could you also share the updated and complete request and response logs, and request-id?

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Peter Laurence
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ehWcY:ref

Mayank Mangal

unread,
Sep 28, 2022, 12:08:06 PM9/28/22
to Google Ads API and AdWords API Forum
Hi Peter,

I have already attached the response above. Attaching it again here with proper formatting:

{

  "error": {
    "code": 429,
    "message": "Resource has been exhausted (e.g. check quota).",
    "status": "RESOURCE_EXHAUSTED",
    "details": [
      {
        "@type": "type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
        "errors": [
          {
            "errorCode": {
              "quotaError": "RESOURCE_EXHAUSTED"
            },
            "message": "Too many requests. Retry in 4 seconds.",
            "details": {
              "quotaErrorDetails": {
                "rateScope": "ACCOUNT",
                "rateName": "Requests per service per method",
                "retryDelay": "4s"
              }
            }
          }
        ],
        "requestId": "AbXI0ljZWuRuXTaOaoTL5w"
      }
    ]
  }
}

Request Id: "AbXI0ljZWuRuXTaOaoTL5w"

Also, everywhere it is mentioned that there is a specific system limit on how many requests can be triggered concurrently. But what is that limit? I need to know this because I will then keep my requests in such a way that it does not lead to "RESOURCE_EXHAUSTED" error later. 

This is the request type:

where the payload of the API is a query with "search_term_view".


Mario García

unread,
Sep 28, 2022, 12:42:14 PM9/28/22
to Google Ads API and AdWords API Forum
We are seeing the same issue using the REST API starting yesterday around 5pm. CST
Here's the output from our log files. Also note the "Slow search response" message.

DEBUG: Tue Sep 27 2022 05:14:53:729 T204 Slow search response: 181162 msec for query SELECT segments.date,ad_group_criterion.criterion_id,ad_group.id,campaign.id,metrics.all_conversions,metrics.all_conversions_value,segments.conversion_action_name,segments.conversion_action_category FROM webpage_view WHERE segments.date BETWEEN 20220730 AND 20220927
INFO: Tue Sep 27 2022 05:14:53:729 T204 SELECT segments.date,ad_group_criterion.criterion_id,ad_group.id,campaign.id,metrics.all_conversions,metrics.all_conversions_value,segments.conversion_action_name,segments.conversion_action_category FROM webpage_view WHERE segments.date BETWEEN 20220730 AND 20220927
ERROR: Tue Sep 27 2022 05:14:53:729 T204 Unexpected response: [
   {
      "error" : {
         "code" : 429,

         "details" : [
            {
               "@type" : "type.googleapis.com/google.ads.googleads.v11.errors.GoogleAdsFailure",
               "errors" : [
                  {
                     "errorCode" : {
                        "quotaError" : "RESOURCE_EXHAUSTED"
                     },
                     "message" : "Too many requests. Retry in 900 seconds."
                  }
               ],
               "requestId" : "eRoaCo0BFd5u5G8mwZqUjQ"
            }
         ],

         "message" : "Resource has been exhausted (e.g. check quota).",
         "status" : "RESOURCE_EXHAUSTED"
      }
   }
]

Google Ads API Forum Advisor

unread,
Sep 29, 2022, 7:07:39 AM9/29/22
to gel...@gmail.com, adwor...@googlegroups.com
Hello Everyone,

I am Carmela from the Google Ads API team as well. Thank you for posting your concern.

Moving forward, it appears that you are seeing the Resource_exhausted error on your end. The said error means a system frequency limit has been exceeded. It commonly occurs when you are sending too many requests in a short period of time. Having said that please try setting up short delays between requests or combining more operations in fewer requests.

Furthermore, could you please retry the request and confirm to us if this is still occurring on your end?

Regards,
Google Logo
Carmela
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ehWcY:ref

Mayank Mangal

unread,
Sep 29, 2022, 7:43:16 AM9/29/22
to Google Ads API and AdWords API Forum
Yes, it is still occurring and yes I know that there is some system frequency limit crossing which it throws the resource exhausted error. However, i have seen that it occurs randomly and is not so predictable at this point for me. 

I wanted to ask for that exact limit only. 

Google Ads API Forum Advisor

unread,
Sep 29, 2022, 3:41:44 PM9/29/22
to mayank...@pixis.ai, adwor...@googlegroups.com
Hi Mayank,

The specific limit for request frequency is not documented because this limit varies based on the server's load at a given moment. The solution is to implement an exponential backoff policy (e.g. the first retry would be 5 seconds, the second 10 seconds, etc.). Other methods for handling QPS related errors can be found here.

Regards,

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ehWcY:ref
Reply all
Reply to author
Forward
0 new messages