I tried to override the deadline by specifying a GrpcCallContext on the api 
call as following, but still doesn't work


ServerStream<SearchGoogleAdsStreamResponse> stream = googleAdsService
    .searchStreamCallable()
    .call(searchGoogleAdsStreamRequest,
        GrpcCallContext.createDefault()
            .withCallOptions(
                CallOptions.DEFAULT.withDeadline(Deadline.after(5, 
TimeUnit.HOURS))));


On Friday, July 17, 2020 at 7:41:27 AM UTC-4, Dihan Cheng wrote:
>
> Hi, I get the following issue after about 1 hour when running a long 
> request, 
> com.google.api.gax.rpc.DeadlineExceededException: 
> io.grpc.StatusRuntimeException: DEADLINE_EXCEEDED: deadline exceeded after 
> 3599968461524ns. [buffered_nanos=287954569, buffered_nanos=165571046, 
> remote_addr=googleads.googleapis.com/216.58.193.74:443];
>
> Following is the code where the exception throws out, just standard google 
> ads api SearchStream call,
>
> how to fix this issue? thanks!
>
> try (GoogleAdsServiceClient googleAdsService = 
> googleAdsClient.getLatestVersion().createGoogleAdsServiceClient()) {
>   ServerStream<SearchGoogleAdsStreamResponse> stream = googleAdsService
>       .searchStreamCallable().call(searchGoogleAdsStreamRequest);
>
>   int count = 0;
>
> *  for (SearchGoogleAdsStreamResponse response : stream) {   // where the 
> exception throws out*    for (GoogleAdsRow googleAdsRow : 
> response.getResultsList()) {
>       JsonObject line = new JsonObject();
>       AdGroupAd adGroupAd = googleAdsRow.getAdGroupAd();
>
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/944c17dd-7cee-4a77-b6e3-b69002e76e7do%40googlegroups.com.

Reply via email to