Hi Cristian,

There are no restrictions on using multithreading with v201109. Nothing has 
changed on this aspect from v201101 to v201109. Danial suggested using 
MutateJobService because it takes care of issues like RateExceededError, 
Concurrent modification errors, etc. automatically. If you use 
multithreading, it is upto you to make sure that your threads won't mutate 
the same object concurrently, expect that the server will throw 
RateExceededError, concurrent modification errors etc. and handle them 
gracefully, etc. That's all.

About increased concurrent modification errors - are you updating keywords 
in multiple adgroups in the same call? If so, could you modify your code to 
mutate keywords in a single AdGroup at a time? That may reduce the 
frequency of concurrent modification errors that you are seeing.

About MJS: MJS can take small job (as low as 1 operation), but as the name 
suggests, it is meant for doing batch operations and works best when you 
add large number of operations. About 100 operations per job would be a 
good number. Also, polling once every second or two is good enough, you 
won't get a rate limit that way.. 

Cheers,
Anash P. Oommen,
AdWords API Advisor.

On Friday, 16 March 2012 15:48:39 UTC+5:30, Cristian Allietto wrote:
>
> Hi Danial,
> thank you for your response.
>
> The post that you have linked to me is dated March 30 2011, so it refers 
> to the v201101 version that is the version that allows me to use 
> multithread.
> So I still not understand if there are (and if so what) new restrictions 
> in the new v201109 version.
>
>
>
> The MutateJobService can be an interesting solution but I find the 
> documentation a bit inaccurate.
>
> The documentation says: "*This service should not be used for small 
> batches*"
> So I assume there is a minum number of operations that the service 
> requires, but what is this minimum number?
>
> And also: *"Caution: Do not do poll the job status too frequently or you 
> will risk getting your customer rate-limited.*"
> What is the maximum frequency allowed to poll the job status without 
> getting a rate-limit? 1 second is enough or I must wait more?
>
> Thank you again for your support
>
> On Thursday, March 15, 2012 12:34:17 PM UTC+1, Danial Klimkin wrote:
>>
>> Hello Cristian,
>>
>>
>> The possible reasons for this error are described here:
>>
>>   
>> http://adwordsapi.blogspot.com/2011/03/concurrency-management-in-adwords-api.html
>>
>> In your particular case I recommend removing multi-threading and using 
>> MutateJobService<http://code.google.com/apis/adwords/docs/reference/latest/MutateJobService.html>instead.
>>  This service automatically retries on errors like this and also 
>> you will use much less API units. The change should be easy as the service 
>> receives the same operation structure as the AdGroupCriterionService.
>>
>>
>> -Danial, AdWords API Team.
>>
>>
>> On Wednesday, March 14, 2012 2:00:44 PM UTC+4, Cristian Allietto wrote:
>>>
>>> Hi,
>>> since one year ago we implemented an application, using the AdWords API 
>>> [image: 
>>> Expand v201101 - deprecated]v201101, that upload some thousands of 
>>> keywords on a specific AdGroup.
>>> To reduce the upload time we implemented it with a multithread system 
>>> that assign a certain number of keywords to each thread.
>>> In this way each keyword is managed only by one specific thread and 
>>> everything worked properly until last month.
>>>
>>> Now we have updated the API to version v201109 (no other changes are 
>>> made on the application) and about 40% of the keywords generate the 
>>> following error:
>>> System.Web.Services.Protocols.SoapException: 
>>> DatabaseError.CONCURRENT_MODIFICATION @ 
>>> com.google.ads.api.services.campaignmgmt.common.error.DatabaseError.<init>(Datab
>>>    in 
>>> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
>>>  
>>> message, WebResponse response, Stream responseStream, Boolean asyncCall)
>>>    in System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String 
>>> methodName, Object[] parameters)
>>>    in Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String 
>>> methodName, Object[] parameters)
>>>
>>> What is changed from version [image: Expand v201101 - deprecated]v201101 
>>> to version v201109 that generates this error?
>>>
>>> Thank you in advance
>>>
>>
On Friday, 16 March 2012 15:48:39 UTC+5:30, Cristian Allietto wrote:
>
> Hi Danial,
> thank you for your response.
>
> The post that you have linked to me is dated March 30 2011, so it refers 
> to the v201101 version that is the version that allows me to use 
> multithread.
> So I still not understand if there are (and if so what) new restrictions 
> in the new v201109 version.
>
>
>
> The MutateJobService can be an interesting solution but I find the 
> documentation a bit inaccurate.
>
> The documentation says: "*This service should not be used for small 
> batches*"
> So I assume there is a minum number of operations that the service 
> requires, but what is this minimum number?
>
> And also: *"Caution: Do not do poll the job status too frequently or you 
> will risk getting your customer rate-limited.*"
> What is the maximum frequency allowed to poll the job status without 
> getting a rate-limit? 1 second is enough or I must wait more?
>
> Thank you again for your support
>
> On Thursday, March 15, 2012 12:34:17 PM UTC+1, Danial Klimkin wrote:
>>
>> Hello Cristian,
>>
>>
>> The possible reasons for this error are described here:
>>
>>   
>> http://adwordsapi.blogspot.com/2011/03/concurrency-management-in-adwords-api.html
>>
>> In your particular case I recommend removing multi-threading and using 
>> MutateJobService<http://code.google.com/apis/adwords/docs/reference/latest/MutateJobService.html>instead.
>>  This service automatically retries on errors like this and also 
>> you will use much less API units. The change should be easy as the service 
>> receives the same operation structure as the AdGroupCriterionService.
>>
>>
>> -Danial, AdWords API Team.
>>
>>
>> On Wednesday, March 14, 2012 2:00:44 PM UTC+4, Cristian Allietto wrote:
>>>
>>> Hi,
>>> since one year ago we implemented an application, using the AdWords API 
>>> [image: 
>>> Expand v201101 - deprecated]v201101, that upload some thousands of 
>>> keywords on a specific AdGroup.
>>> To reduce the upload time we implemented it with a multithread system 
>>> that assign a certain number of keywords to each thread.
>>> In this way each keyword is managed only by one specific thread and 
>>> everything worked properly until last month.
>>>
>>> Now we have updated the API to version v201109 (no other changes are 
>>> made on the application) and about 40% of the keywords generate the 
>>> following error:
>>> System.Web.Services.Protocols.SoapException: 
>>> DatabaseError.CONCURRENT_MODIFICATION @ 
>>> com.google.ads.api.services.campaignmgmt.common.error.DatabaseError.<init>(Datab
>>>    in 
>>> System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
>>>  
>>> message, WebResponse response, Stream responseStream, Boolean asyncCall)
>>>    in System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String 
>>> methodName, Object[] parameters)
>>>    in Google.Api.Ads.Common.Lib.AdsSoapClient.MakeApiCall(String 
>>> methodName, Object[] parameters)
>>>
>>> What is changed from version [image: Expand v201101 - deprecated]v201101 
>>> to version v201109 that generates this error?
>>>
>>> Thank you in advance
>>>
>>

-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
http://adwordsapi.blogspot.com
http://groups.google.com/group/adwords-api
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API Forum" group.
To post to this group, send email to adwords-api@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/adwords-api?hl=en

Reply via email to