Is automatic retry possible if "UNAVAILABLE" error occurs?

139 views
Skip to first unread message

JIHoon Ock

unread,
Jun 9, 2023, 2:58:16 AM6/9/23
to Google Ads API and AdWords API Forum
Thank you for looking at my question.

Intermittent errors occur in the process of inquiring campaign information.

=======================================================
Response
--------
Headers: null
Body: null
Failure message: null
Status: Status{code=UNAVAILABLE, description=io exception, cause=io.grpc.netty.shaded.io.netty.channel.AbstractChannel$AnnotatedNoRouteToHostException: null: googleads.googleapis.com/2404:6800:4005:81c:0:0:0:200a:443
Caused by: java.net.NoRouteToHostException
at io.grpc.netty.shaded.io.netty.channel.unix.Errors.newConnectException0(Errors.java:147)
at io.grpc.netty.shaded.io.netty.channel.unix.Errors.handleConnectErrno(Errors.java:128)
at io.grpc.netty.shaded.io.netty.channel.unix.Socket.connect(Socket.java:313)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel.doConnect0(AbstractEpollChannel.java:773)
at io.grpc.netty.shaded.io.netty.channel.epoll.EpollSocketChannel.doConnect0(EpollSocketChannel.java:144)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel.doConnect(AbstractEpollChannel.java:758)
at io.grpc.netty.shaded.io.netty.channel.epoll.AbstractEpollChannel$AbstractEpollUnsafe.connect(AbstractEpollChannel.java:600)
at io.grpc.netty.shaded.io.netty.channel.DefaultChannelPipeline$HeadContext.connect(DefaultChannelPipeline.java:1342)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:548)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.connect(AbstractChannelHandlerContext.java:533)
at io.grpc.netty.shaded.io.netty.channel.ChannelDuplexHandler.connect(ChannelDuplexHandler.java:54)
at io.grpc.netty.shaded.io.grpc.netty.WriteBufferingAndExceptionHandler.connect(WriteBufferingAndExceptionHandler.java:157)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.invokeConnect(AbstractChannelHandlerContext.java:548)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext.access$1000(AbstractChannelHandlerContext.java:61)
at io.grpc.netty.shaded.io.netty.channel.AbstractChannelHandlerContext$9.run(AbstractChannelHandlerContext.java:538)
at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.runTask(AbstractEventExecutor.java:174)
at io.grpc.netty.shaded.io.netty.util.concurrent.AbstractEventExecutor.safeExecute(AbstractEventExecutor.java:167)
at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor.runAllTasks(SingleThreadEventExecutor.java:470)
at io.grpc.netty.shaded.io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:391)
at io.grpc.netty.shaded.io.netty.util.concurrent.SingleThreadEventExecutor$4.run(SingleThreadEventExecutor.java:997)
at io.grpc.netty.shaded.io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74)
at io.grpc.netty.shaded.io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:750)
}.
=======================================================
▶ WARN  2023-06-09 12:14:30.629 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:31.553 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:31.966 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:39.793 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:45.906 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:14:59.060 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:15:06.664 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ WARN  2023-06-09 12:15:25.597 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:159] - FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: null, ResponseCode: UNAVAILABLE, Fault: io exception.
▶ INFO  2023-06-09 12:15:44.210 [grpc-default-executor-23] com.google.ads.googleads.lib.request.summary[logAtLevel:157] - SUCCESS REQUEST SUMMARY. Method: google.ads.googleads.v13.services.GoogleAdsService/Search, Endpoint: googleads.googleapis.com:443, CustomerID: {{id}}, RequestID: N0kAGKKNa8VkcaRolWiWDw, ResponseCode: OK, Fault: null.
======================================================

If you check the log, it looks like it's retrying automatically.
Am I right in guessing?

If the guess is correct, can I know the maximum number of retries I try?

Google Ads API and AdWords API Forum

unread,
Jun 9, 2023, 1:37:20 PM6/9/23
to Google Ads API and AdWords API Forum
Re-posting the last inquiry (https://groups.google.com/g/adwords-api/c/GauIioOpooc) from the forum as it wasn't routed to our support queue.

Regards,
Google Ads API Team

Google Ads API Forum Advisor

unread,
Jun 15, 2023, 3:48:00 AM6/15/23
to adwor...@googlegroups.com

Hi,

Thank you for raising your concern to the Google Ads API team.

Can you confirm if you are using our JAVA client library? If yes, then you may refer to our JAVA client documentation for the configuration settings(https://developers.google.com/google-ads/api/docs/client-libs/java/config-file). Kindly check if you have configured your library correctly. If you have confirmed that it is configured correctly, but the issue persists, I recommend reaching out to the Client library author (https://github.com/googleads/google-ads-java/issues). Please note that the NoRouteToHostException error is a client library related error and not an issue with the API.

To answer your questions in general, retrying requests is possible, you may refer here: https://developers.google.com/google-ads/api/docs/client-libs/java/advanced-usage#retry_settings

When you retry requests, use an exponential backoff policy. For example, if you first pause 5 seconds before the first retry, you could pause 10 seconds after the second and 20 seconds after the third retry. Exponential backoff helps ensure you are not calling the API too aggressively. You may refer here for the retryable errors: https://developers.google.com/google-ads/api/docs/best-practices/error-types#retryable_errors

In addition, make sure that you conform with our API quota and limitations(https://developers.google.com/google-ads/api/docs/best-practices/quotas)

Let me know if you have any questions.

This message is in relation to case "ref:_00D1U1174p._5004Q2mBL7e:ref"

Thanks,
 
Google Logo Google Ads API Team


Reply all
Reply to author
Forward
0 new messages