Hi Tozor, I agree that more documentation is needed around locking, and I'll see what I can do about improving that. For large enough jobs, I can see how retries may not be enough to avoid errors altogether, but with enough retries you should be able to achieve a high success rate. I think it might also make sense to look into splitting your requests by campaign. If all the ad groups of a campaign are updated at once, then you won't need to make further requests against that campaign and won't run into locking errors.
Best, - Eric On Aug 21, 2:47 pm, tozor <[email protected]> wrote: > Thanks for the detailed response. I have tried retrying with even up > to a 5 second delay between failures but I still see an error. > However given your explanation of campaign level locking, I think it > is going to be problematic to update the URL of multiple criterias via > a single call to updateCriteria in my application environment. In the > case where I need to do this I can have thousands of URLs to update > and often they are spread out over several campaigns. > > I do think this needs some documentation explanation since the same > updateCriteria method can behave very differently depending on what > attribute(s) you are updating. > > Thanks again. > > Tim > > On Aug 21, 11:39 am, AdWords API Advisor > > > > <[email protected]> wrote: > > Hi Tozor, > > > Thank you for taking the time to get me a RequestId, as it helps me > > immensely when trying to track down an issue. Including this > > information in the fault text could be a good idea, and I will bring > > this up with the core development team. > > > I looked into the problem that you encountered during that specific > > request, and the cause seems to be locking. About two seconds earlier > > you updated the destination URL of a set of keywords in an ad group. > > When a change is made to a keyword it must be approved again by the > > system. In this case, the approval was complete two seconds later, > > and the keywords were being updated by the system to reflect that. At > > the same time you were trying to make another updateCriteria request > > against a different ad group in the same campaign. > > > Since the locking in this case was done at a campaign level, your > > request conflicted with the lock created by the system's approval > > process. When you do smaller batches of keywords this problem likely > > isn't encountered because the approval process happens more quickly, > > before you can issue your next request. > > > In this situation I would recommend trying to catch the exception and > > retry the update. As you've observed, a conflict between these two > > processes is rare, so a single retry would likely be enough to avoid > > another collision. > > > Best, > > - Eric > > > On Aug 20, 5:53 pm, tozor <[email protected]> wrote: > > > > Ok I figured out how to get the request id in my java v13 environment > > > via the AdwordsServiceLogger.log() method. The request id of the > > > failing request was 273216e94875b516cd2b478a4b9595f1. > > > > I would like to reiterate that it would be really cool if the request > > > id was returned in the error message. I had to change code to enable > > > this logging and then install it in my production environment. The > > > amount of logging was so voluminous that a 10G log file was produced > > > before the error was reproduced. If there is a simpler procedure to > > > get the request id when a request fails I would be most interested to > > > know. > > > > Hopefully you can shed some light on why I am getting this concurrency > > > error. > > > > Thanks. > > > > Tim > > > > On Aug 20, 11:52 am, tozor <[email protected]> wrote: > > > > > How do I get at the request ID? Is there some sort of logging I am > > > > supposed to enable? Assuming that your answer is yes, can I make a > > > > comment that it would be nice if the Adwords server dumped out the > > > > request id in the error message so that I don't have to recompile code > > > > and then install it into my production environment in order to get > > > > this info. > > > > > I can reproduce this problem very regularly, so please let me know how > > > > to get this request ID. > > > > > Thanks again. > > > > > Tim > > > > > On Aug 20, 9:00 am, AdWords API Advisor <[email protected]> > > > > wrote: > > > > > > Hi Tim, > > > > > > I will look into the logs and see if I can get more information about > > > > > these errors you are running up against. Can you please send me the > > > > > Request ID of an updateCriteria request that generated the error? > > > > > > Thanks, > > > > > - Eric Koleda, AdWords API Team > > > > > > On Aug 19, 9:29 am, tozor <[email protected]> wrote: > > > > > > > I seem to be able to trigger the following error in Adwords > > > > > > consistently when I update multiple destination URLs via the V13 > > > > > > updateCriteria method: > > > > > > > AxisFault > > > > > > faultCode: {http://schemas.xmlsoap.org/soap/envelope/} > > > > > > Server.userException > > > > > > faultSubcode: > > > > > > faultString: The Attempted modification failed due to changes made > > > > > > concurrently by another agent or user. > > > > > > faultActor: > > > > > > faultNode: > > > > > > faultDetail: > > > > > > {https://adwords.google.com/api/adwords/v13}fault: > > > > > > <ns1:code>58</ns1:code> > > > > > > > <ns1:message>The Attempted modification failed due to changes > > > > > > made concurrently by another agent or user.</ns1:message> > > > > > > > In the program I am running which triggers the error, there is only > > > > > > a > > > > > > single thread of execution. Also if I change the code to only pass > > > > > > in > > > > > > a single criteria at a time, I never see the error. This is not a > > > > > > great workaround since it is so much faster to pass in multiple > > > > > > criteria to the updateCriteria method. I reproduced this error > > > > > > several times, so it was not like a single transient failure. > > > > > > > One other point of interest is that my application routinely updates > > > > > > the cpc of multiple criteria in a single updateCriteria call and I > > > > > > have never seen this error. So I am wondering if there is something > > > > > > special regrading the update of the destination URL of multiple > > > > > > criteria. > > > > > > > Thanks as always. > > > > > > > Tim --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
