Deadline Exceeded Error

91 views
Skip to first unread message

Muneeb Varuvalayil

unread,
Mar 8, 2023, 11:52:48 PM3/8/23
to Google Ads API and AdWords API Forum
We are observing the GRPC::DeadlineExceeded error while querying the google ads API via  ruby client.

Query:

```
  SELECT ad_group.id, ad_group_ad.ad.id, ad_group_ad.ad.name,
         ad_group_ad.ad.type, ad_group_ad.status,
         ad_group_ad.ad.display_url, ad_group_ad.ad.final_urls,
         ad_group_ad.ad.device_preference, ad_group_ad.ad.text_ad.headline,
         ad_group_ad.ad.text_ad.description1, ad_group_ad.ad.text_ad.description2,
         ad_group_ad.ad.image_ad.image_url, ad_group_ad.ad.image_ad.preview_image_url,
         ad_group_ad.ad.image_ad.pixel_height, ad_group_ad.ad.image_ad.pixel_width,
         ad_group_ad.ad.expanded_text_ad.headline_part1,
         ad_group_ad.ad.expanded_text_ad.headline_part2,
         ad_group_ad.ad.expanded_text_ad.headline_part3,
         ad_group_ad.ad.expanded_text_ad.description,
         ad_group_ad.ad.expanded_text_ad.description2,
         ad_group_ad.ad.expanded_text_ad.path1, ad_group_ad.ad.expanded_text_ad.path2,
         ad_group_ad.ad.responsive_search_ad.headlines, ad_group_ad.ad.responsive_search_ad.descriptions,
         ad_group_ad.ad.responsive_search_ad.path1, ad_group_ad.ad.responsive_search_ad.path2,
         ad_group_ad.ad.legacy_responsive_display_ad.marketing_image,
         ad_group_ad.ad.legacy_responsive_display_ad.square_marketing_image,
         ad_group_ad.ad.legacy_responsive_display_ad.business_name,
         ad_group_ad.ad.legacy_responsive_display_ad.long_headline,
         ad_group_ad.ad.legacy_responsive_display_ad.short_headline,
         ad_group_ad.ad.gmail_ad.marketing_image, ad_group_ad.ad.gmail_ad.marketing_image_headline,
         ad_group_ad.ad.expanded_dynamic_search_ad.description
    FROM ad_group_ad
   WHERE segments.date
 BETWEEN '2023-02-18'
     AND '2023-02-20'
     AND metrics.impressions > 0
```

I went through some of the previous forum posts on similar issues. Based on the suggestions provided in those posts, I tried to increase the timeout value and also tried reducing the scope of the query to fetch smaller amounts of data.

Currently, we have set the timeout value to 3 hours, and we tried reducing the amount of data fetched by querying for only one day's worth of data.

I am still facing same issues, and I was wondering if anyone could help me here

Google Ads API Forum Advisor

unread,
Mar 9, 2023, 3:07:37 AM3/9/23
to muneeb.va...@clarisights.com, adwor...@googlegroups.com

Hi,

Thank you for reaching out to Google Ads API Forum.

The DEADLINE_EXCEEDED error indicates that your request took longer than the deadline. Having said that, you may check this timeout documentation for more information about timeouts and this link for an example how to set a custom client timeout in the Ruby client library. Kindly note that as per the guide, you can set a timeout as large as you like, but the API may still time out on responses that takes over two hours and return a DEADLINE_EXCEEDED error. 

Let me know how it goes on your end. If the error persists, you may share to us the complete request and response logs with the request-id so we can check further. For the Ruby client library, logging can be enabled by following this guide. You can provide it to us via the Reply privately to author option.

Regards,

Google Logo Google Ads API Team


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