Hi,
over the past days, we experienced an increasing number of read-timeouts
when making API calls.
The timeouts are not restricted to a specific service but we have observed
them for CampaignService,
TrafficEstimatorService, Reporting and some others . I seems that our
network is not the problem
because other (concurrent) calls are processed with out problems at the
same time. It just seems
that, once in a while, an API call gets "hit" by a timeout. Actually, it
looks like that making the request
is not the problem but rather reading the response. Most of the time, we
our retry mechanism
catches the timeout and re-runs the API call. As far we have examined it,
all calls got processed
without problems when retried.
Our main problem is that the timeout occurs after an exceptionally long
time (ranging from minutes to
up to an hour). This slows down some of our backend processes significantly
because some calls
hang for an hour before the retry mechanism applies. We have not set any
explicit timeout on the
adwords session or the API in general. Also, we did not experience this
behavior before, it just
started to appear some days ago.
We don't really know if we can do anything to improve the situation but as
a first step, we'd like to
decrease the timeout for the adwords session. However, we don't know how to
this and did not
manage to find instructions. So is there any way of explicitly setting a
timeout for an adwords session?
I've attached an example request that failed with a timeout (to
CampaignService) and response (well,
the response is empty) as well as the stack trace of the root cause
exception.
Cheers,
Stefan
---------------------------
Here is the exception (I cropped the stacktrace where the call "leaves" our
code):
java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
~[na:1.8.0_25]
at java.net.SocketInputStream.read(SocketInputStream.java:150)
~[na:1.8.0_25]
at java.net.SocketInputStream.read(SocketInputStream.java:121)
~[na:1.8.0_25]
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
~[na:1.8.0_25]
at sun.security.ssl.InputRecord.readV3Record(InputRecord.java:593)
~[na:1.8.0_25]
at sun.security.ssl.InputRecord.read(InputRecord.java:532)
~[na:1.8.0_25]
at
sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:954)
~[na:1.8.0_25]
at
sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:911)
~[na:1.8.0_25]
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
~[na:1.8.0_25]
at java.io.BufferedInputStream.fill(BufferedInputStream.java:246)
~[na:1.8.0_25]
at java.io.BufferedInputStream.read1(BufferedInputStream.java:286)
~[na:1.8.0_25]
at java.io.BufferedInputStream.read(BufferedInputStream.java:345)
~[na:1.8.0_25]
at java.io.FilterInputStream.read(FilterInputStream.java:133)
~[na:1.8.0_25]
at org.apache.axis.SOAPPart.getAsBytes(SOAPPart.java:453)
[axis-1.4.jar:na]
at org.apache.axis.SOAPPart.getAsString(SOAPPart.java:559)
[axis-1.4.jar:na]
at org.apache.axis.Message.getSOAPPartAsString(Message.java:412)
[axis-1.4.jar:na]
at
com.google.api.ads.common.lib.soap.axis.AxisHandler.invokeSoapCall(AxisHandler.java:281)
[ads-lib-axis-2.17.0.jar:na]
at
com.google.api.ads.common.lib.soap.SoapServiceClient.callSoapClient(SoapServiceClient.java:62)
[ads-lib-2.17.0.jar:na]
at
com.google.api.ads.common.lib.soap.SoapServiceClient.invoke(SoapServiceClient.java:92)
[ads-lib-2.17.0.jar:na]
at com.sun.proxy.$Proxy122.get(Unknown Source) [na:na]
at
com.adference.connector.google.CampaignServiceGET.execute(CampaignServiceGET.java:23)
[google-adwords-api-connector-v21_2.jar:na]
...
The SOAP request:
---------------------------
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Header>
<ns1:RequestHeader
xmlns:ns1="https://adwords.google.com/api/adwords/cm/v201607"
soapenv:mustUnderstand="0">
<ns1:clientCustomerId>xxxxxxxxxxx</ns1:clientCustomerId>
<ns1:developerToken>REDACTED</ns1:developerToken>
<ns1:userAgent>xxxxxxxxxxx</ns1:userAgent>
<ns1:validateOnly>false</ns1:validateOnly>
<ns1:partialFailure>false</ns1:partialFailure>
</ns1:RequestHeader>
</soapenv:Header>
<soapenv:Body>
<get xmlns="https://adwords.google.com/api/adwords/cm/v201607">
<serviceSelector>
<fields>Id</fields>
<fields>Name</fields>
<fields>Status</fields>
<fields>Amount</fields>
<fields>Settings</fields>
<fields>AdvertisingChannelType</fields>
<predicates>
<field>AdvertisingChannelType</field>
<operator>IN</operator>
<values>SEARCH</values>
<values>SHOPPING</values>
</predicates>
<predicates>
<field>Status</field>
<operator>IN</operator>
<values>PAUSED</values>
<values>ENABLED</values>
<values>REMOVED</values>
</predicates>
<paging>
<startIndex>0</startIndex>
<numberResults>9999</numberResults>
</paging>
</serviceSelector>
</get>
</soapenv:Body>
</soapenv:Envelope>
---------------------------
And here the SOAP response
2016-09-08 08:40:46,725 1366360824 [qtp1501587365-37324] WARN
soapXmlLogger SOAP Response:
null
--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and Google+:
https://googleadsdeveloper.blogspot.com/
https://plus.google.com/+GoogleAdsDevelopers/posts
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
You received this message because you are subscribed to the Google
Groups "AdWords 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 Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit
https://groups.google.com/d/msgid/adwords-api/a6fd0fee-71f2-4bab-8a70-2552d65b03d8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.