Deadline Exceeded when fetching ads since 4/6

1,390 views
Skip to first unread message

Gavin

unread,
Apr 8, 2022, 6:39:37 PM4/8/22
to Google Ads API and AdWords API Forum
Hello,

We noticed that starting from this Wednesday, lots of RPC exceptions with "Deadline Exceeded" started to show up in the queries for Responsive Search Ads. Those queries that we sent to Google Ads API may return large amount of Responsive Search Ads but there was no such problem at all when we did the same queries before Wednesday.

Here is a sample of the query text. I intentionally removed the long campaign id list.

SELECT ad_group_ad.ad.final_urls, ad_group_ad.ad.final_mobile_urls, ad_group_ad.ad.id, ad_group_ad.ad.responsive_search_ad.descriptions, ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.path1, ad_group_ad.ad.responsive_search_ad.path2, ad_group_ad.ad.tracking_url_template, ad_group_ad.ad.url_custom_parameters, ad_group_ad.ad.final_url_suffix, ad_group_ad.status, ad_group.id, ad_group.name, campaign.name
FROM ad_group_ad
WHERE campaign.id IN (some,campaign,ids)
AND ad_group_ad.ad.type = 'RESPONSIVE_SEARCH_AD'
AND campaign.status != 'REMOVED'
AND ad_group.status != 'REMOVED'
AND ad_group_ad.status != 'REMOVED'
ORDER BY ad_group_ad.ad.id ASC

The query can successfully return ~400k Responsive Search Ads within 40 minutes. But now it hit the "Deadline Exceeded" every 15 minutes.

Grpc.Core.RpcException: Status(StatusCode="DeadlineExceeded", Detail="Deadline Exceeded", DebugException="Grpc.Core.Internal.CoreErrorDetailException: {"created":"@1649206190.828953998","description":"Error received from peer ipv4:172.217.4.42:443","file":"/var/local/git/grpc/src/core/lib/surface/call.cc","file_line":1070,"grpc_message":"Deadline Exceeded","grpc_status":4}")

Was there a change on the Google Ads API server side on the timeout for the grpc connection? If there was, what was the reason and was it a temporary or permanent change?

Sometimes, the error happened after 15 minutes has a different flavor:

  "Failure": {
    "errors": [
      {
        "errorCode": {
          "requestError": "RPC_DEADLINE_TOO_SHORT"
        },
        "message": "The request timed out because the specified deadline was too short to complete the request. Please set a larger deadline and retry."
      }
    ],

My understanding is that the default deadline should be 1 hour rather than 15 mins based on the setting here.

If the above error message is just another variation of the "Deadline Exceeded" error, is 15min the current default value and how can I set it to a larger value?

Thanks,
Gavin

Google Ads API Forum Advisor

unread,
Apr 11, 2022, 2:10:15 AM4/11/22
to gms1...@gmail.com, adwor...@googlegroups.com
Hi Gavin,

Thank you for reaching out to us.

The DEADLINE_EXCEEDED error occurs when the request took longer than a deadline.

But since you said that “The query can successfully return ~400k Responsive Search Ads within 40 minutes. But now it hit the "Deadline Exceeded" every 15 minutes” even though the default value is 1 hour, then this could indicate an issue with the client library. I would recommend that you reach out to the client library owners via this link , to check the issue on the client library that causing the RPC_DEADLINE_TOO_SHORT.

Best regards,
Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2ZLKsd:ref

Christian H.

unread,
Jun 22, 2022, 7:20:57 AM6/22/22
to Google Ads API and AdWords API Forum
Hi!

I have the same problem: downloading RSAs takes too long (for some accounts). I run into the DEADLINE_EXCEEDED exception too (And I set the timeout to 20 minutes which should be more than sufficient).

There is a workaround: if I request headlines and descriptions with different requests the response is returned within seconds.

But I would rather remove the workaround and not split the request.

Best regards,

Christian

Google Ads API Forum Advisor

unread,
Jun 22, 2022, 9:40:00 AM6/22/22
to christian...@gmail.com, adwor...@googlegroups.com
Hi Christian,


Thank you for reaching out to us.

You may note that timeouts are often because what is being queried is too big to send back to you. It appears that those accounts where this is failing contain a lot of data. To fix this deadline exceeded error you are encountering, I would suggest you decrease the size of your data that you're requesting back by adding filtration to your queries.

Christian H.

unread,
Jun 23, 2022, 3:13:57 AM6/23/22
to Google Ads API and AdWords API Forum
Hi Heidi,

that's what I'm already doing if possible: I select only the ads of specified adgroups. But in some cases I have to load all ads of the accounts and splitting up the request is really unhandy. In my opinion there is a performance issue/bug on your side. The reasons why I believe this are:
- for some account it works, for some it doesn't, even if the accounts have a similar structure and ad amount
- when requesting headline and description separately everything works fine and as expected. only when I request both fields at the same time the problem occurs
- with the old API we never had this problem

This reminds me of the problem I reported in February: after switching the the new API the conversion uploads were *much* slower than with the old API. And the first reaction was  "try to modify your request" too. In the end the seems to have been a bug, because a short time later the upload needed exactly the same time with the new and the old API.

So it would be great If you could double check, if there aren't any problems on your side. I understand that changing systems is difficult, but making working requests slower / worse and ask the client to modify the request can't be the goal of a migration.

Greetings & thanks for taking the time,

Christian

Google Ads API Forum Advisor

unread,
Jun 23, 2022, 9:49:48 AM6/23/22
to christian...@gmail.com, adwor...@googlegroups.com

Hi Christian,

Thanks for getting back to us.

Could you confirm if you’re using our supported client library and encountering DEADLINE_EXCEEDED error? If yes, you may try not using proto-plus. Does it help if you switch to the non-proto-plus interface described in our docs for slower requests on your end? Usually generating a request this large can be slow because of the performance implications of proto-plus, but using the native protobuf interface will bypass that logic, and it is much faster. 

Also, could you confirm if you’re encountering said error using REST as well? You may provide our team complete request and response logs, with the request-id generated via reply privately to author option, so that I can check further on my end.

Regards,

Google Logo
Yasar
Google Ads API Team
 


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