Adwords API is slow and Throws UNexpected Internal API Exception after 11 hours

149 views
Skip to first unread message

chandra sekhar tammana

unread,
Sep 16, 2015, 4:24:55 AM9/16/15
to AdWords API Forum

 HI ,

     I am using adwords API with Single thread for a Account ... When i am using   ProductPartitionTree.createAdGroupTree(adWordsServices, adWordsSession, adGroup.getId())           method retrieving Already  exists Partition Tree for Ad-group...


  Scenario: 
               When Application Request API for updating these ProductGroups then   Request takes 11 hours and throws an exception UnexpectedINternalAPI Exception ..... but it has worked for other ad-groups ...it is happening only for few particular Adgroups ..
              I am using java implementation classes there is no chance for timeing out the request .
              Could you guys suggest me some good approach to handle these Long API Requests.


  Request :

             

<?xml version="1.0" encoding="UTF-8"?><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/v201506" soapenv:mustUnderstand="0">
            <ns1:clientCustomerId> 594-174-5471 </ns1:clientCustomerId>
            <ns1:userAgent>rakuten_de:AdwordAPIClient:v15_02 (AwApi-Java, AdWords-Axis/2.2.0, Common-Java/2.2.0, Axis/1.4, Java/1.7.0_79, maven)</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/v201506">
            <serviceSelector>
                <fields>AdGroupId</fields>
                <fields>Id</fields>
                <fields>ParentCriterionId</fields>
                <fields>PartitionType</fields>
                <fields>CriteriaType</fields>
                <fields>CaseValue</fields>
                <fields>CpcBid</fields>
                <fields>CpcBidSource</fields>
                <fields>Status</fields>
                <predicates>
                    <field>AdGroupId</field>
                    <operator>EQUALS</operator>
                    <values>23329649769</values>
                </predicates>
                <predicates>
                    <field>CriteriaType</field>
                    <operator>EQUALS</operator>
                    <values>PRODUCT_PARTITION</values>
                </predicates>
                <predicates>
                    <field>Status</field>
                    <operator>IN</operator>
                    <values>ENABLED</values>
                    <values>PAUSED</values>
                </predicates>
                <paging>
                    <startIndex>1000</startIndex>
                    <numberResults>100</numberResults>
                </paging>
            </serviceSelector>
        </get>
    </soapenv:Body>
</soapenv:Envelope>



<?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
        <soap:Fault>
            <faultcode>soap:Server</faultcode>
            <faultstring>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro</faultstring>
            <detail>
                <ApiExceptionFault xmlns="https://adwords.google.com/api/adwords/cm/v201506">
                    <message>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro</message>
                    <ApplicationException.Type>ApiException</ApplicationException.Type>
                    <errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError">
                        <fieldPath/>
                        <trigger/>
                        <errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString>
                        <ApiError.Type>InternalApiError</ApiError.Type>
                        <reason>UNEXPECTED_INTERNAL_API_ERROR</reason>
                    </errors>
                </ApiExceptionFault>
            </detail>
        </soap:Fault>
    </soap:Body>
</soap:Envelope>



AxisFault
 faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server
 faultSubcode:
 faultString: InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro
 faultActor:
 faultNode:
 faultDetail:
        {https://adwords.google.com/api/adwords/cm/v201506}ApiExceptionFault:<message>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.&lt;init&gt;(InternalApiErro</message><ApplicationException.Type>ApiException<
/ApplicationException.Type><errors xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="InternalApiError"><fieldPath/><trigger/><errorString>InternalApiError.UNEXPECTED_INTERNAL_API_ERROR</errorString><ApiError.Type>InternalApiError</ApiError.Type><reason>UNEX
PECTED_INTERNAL_API_ERROR</reason></errors>

InternalApiError.UNEXPECTED_INTERNAL_API_ERROR @ com.google.ads.api.services.common.error.InternalApiError.<init>(InternalApiErro
        at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
        at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
        at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
        at java.lang.reflect.Constructor.newInstance(Constructor.java:526)
        at java.lang.Class.newInstance(Class.java:379)
        at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:104)
        at org.apache.axis.encoding.ser.BeanDeserializer.<init>(BeanDeserializer.java:90)
        at com.google.api.ads.adwords.axis.v201506.cm.ApiException.getDeserializer(ApiException.java:143)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
        at java.lang.reflect.Method.invoke(Method.java:606)
        at org.apache.axis.encoding.ser.BaseDeserializerFactory.getSpecialized(BaseDeserializerFactory.java:154)
        at org.apache.axis.encoding.ser.BaseDeserializerFactory.getDeserializerAs(BaseDeserializerFactory.java:84)
        at org.apache.axis.encoding.DeserializationContext.getDeserializer(DeserializationContext.java:464)
        at org.apache.axis.encoding.DeserializationContext.getDeserializerForType(DeserializationContext.java:547)
        at org.apache.axis.message.SOAPFaultDetailsBuilder.onStartChild(SOAPFaultDetailsBuilder.java:157)
        at org.apache.axis.encoding.DeserializationContext.startElement(DeserializationContext.java:1035)
        at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
        at org.apache.xerces.impl.XMLNSDocumentScannerImpl.scanStartElement(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
        at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XML11Configuration.parse(Unknown Source)
        at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
        at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
        at org.apache.xerces.jaxp.SAXParserImpl.parse(Unknown Source)
        at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
        at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)   

  Thanks,
  Chandra

Josh Radcliff (AdWords API Team)

unread,
Sep 16, 2015, 5:57:10 PM9/16/15
to AdWords API Forum
Hi Chandra,

That ad group looks strange to me. It has a single ProductPartition for "All products" that's excluded (a NegativeAdGroupCriterion). Could you elaborate on why you configured the ad group in this way? That criterion means that the ad group won't serve ads for any products.

Thanks,
Josh, AdWords API Team

Josh Radcliff (AdWords API Team)

unread,
Sep 21, 2015, 7:51:02 AM9/21/15
to AdWords API Forum
Hi Chandra,

On Friday I released version 2.4.1 of the Java client library that included a fix for issue #50 for the ProductPartitionTree. Could you try using that version and let me know if you still encounter this problem?

Thanks,
Josh, AdWords API Team

Reply all
Reply to author
Forward
0 new messages