Can't set deadline exceeded limit on Google Ads Ruby Client.

60 views
Skip to first unread message

Himanshu Patel

unread,
Aug 30, 2023, 11:12:30 AM8/30/23
to Google Ads API and AdWords API Forum
Hi Google Ads Team,

I followed the docs to set the max deadline for wait in Ruby GRPC Client. But I see that is not being honored.

```
@client.service.google_ads.configure do |config|
config.rpcs.search_stream.timeout = STREAM_TIMEOUT_SECONDS
end
```

But when I put a byebug and check in the code execution. `config` do not retains the time limit of `timeout`, means as soon the above block ends `config` just lose the `timeout` field.

For example here
```
@client.service.google_ads.configure do |config|
config.rpcs.search_stream.timeout = STREAM_TIMEOUT_SECONDS
end
@client.service.google_ads.configure do |config|
byebug
end
```
In byebug `config` will no longer have the data we set above.

Please Help.

Google Ads API Forum Advisor

unread,
Aug 30, 2023, 3:25:26 PM8/30/23
to himansh...@clarisights.com, adwor...@googlegroups.com
Hi Himanshu,

Thank you for reaching out to the Google Ads API support team. I hope that you are doing well today.

I can see that you are trying to set the timeout but the value that you set is not retained. That being said, since you mentioned that it is not working on your end, could you please provide us the complete request and response logs with request ID and request header generated on your end? If you haven't enabled the logging yet, logging can be enabled by navigating to the Client libraries > Your client library (ex. Java) > Logging documentation, which you can access from this link.
 
This message is in relation to case "ref:_00D1U1174p._5004Q2o9VWz:ref"

Thanks,
 
Google Logo Google Ads API Team


Himanshu Patel

unread,
Aug 31, 2023, 5:06:32 AM8/31/23
to Google Ads API and AdWords API Forum
Request ID (SENSITIVE text means we removed that information from the text, but it is otherwise present)

I, [2023-08-31T08:57:11.676461 #988]  INFO -- : CID: SENSITIVE, Host: googleads.googleapis.com:443, Method: /google.ads.googleads.v14.services.GoogleAdsService/Search, IsFault: no, Request ID: f8pAfAySLo3cjPIBaKKRIw

Request Header (SENSITIVE text means we removed that information from the text, but it is otherwise present)

D, [2023-08-31T08:57:11.676625 #988] DEBUG -- : Outgoing request: Headers: {"developer-token":"REDACTED","login-customer-id":"SENSITIVE","x-goog-api-client":"gl-ruby/2.7.5 gccl/23.0.0 gax/0.6.1 gapic/23.0.0 grpc/1.42.0","x-goog-request-params":"customer_id=SENSITIVE"} Payload: {"customerId":"SENSITIVE","query":"SELECT ad_group.id, asset.id, asset.name, asset.type, asset.image_asset.file_size, asset.image_asset.full_size.height_pixels, asset.image_asset.full_size.url, asset.image_asset.full_size.width_pixels, asset.image_asset.mime_type, asset.book_on_google_asset, asset.youtube_video_asset.youtube_video_id, asset.resource_name, asset.text_asset.text, asset.youtube_video_asset.youtube_video_title, metrics.all_conversions, metrics.all_conversions_value, metrics.clicks, metrics.conversions, metrics.conversions_value, metrics.cost_micros, metrics.impressions, metrics.view_through_conversions, metrics.biddable_app_install_conversions, metrics.biddable_app_post_install_conversions, segments.date\n FROM ad_group_ad_asset_view\n WHERE segments.date\n BETWEEN '2023-08-17'\n AND '2023-08-19'\n AND metrics.impressions > 0\n AND campaign.advertising_channel_type = 'MULTI_CHANNEL'\n"}

Thanks,
Please Help.

Google Ads API Forum Advisor

unread,
Aug 31, 2023, 10:17:27 AM8/31/23
to himansh...@clarisights.com, adwor...@googlegroups.com
Hi Himanshu,

Thank you for returning to our team.

As for your concern, can you confirm if you already tried this Timeouts (https://developers.google.com/google-ads/api/docs/client-libs/ruby/timeouts?hl=en) guide on your end? If so and yet you are still having issues with this, then I would suggest reaching out to the Ruby client library authors via this Github issues link (https://github.com/googleads/google-ads-ruby/issues) for assistance regarding this issue.

Himanshu Patel

unread,
Aug 31, 2023, 2:58:20 PM8/31/23
to Google Ads API and AdWords API Forum
Yes, I referred the above said method for Timeout. I the examples given in github. Will raise an issue there. 
Reply all
Reply to author
Forward
0 new messages