Re: DatabaseError.CONCURRENT_MODIFICATION error

2020-02-19 Thread Google Ads API Forum Advisor Prod
Hello Qian,

As a suggestion to avoid such errors in a multi threaded environment, I would 
like to share some best practices from this handy guide. One recommendation in 
that guide includes : "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 back off helps ensure you are not calling the API too 
aggressively." As a workaround you could 1) space the requests against the same 
ID so that any given one finishes before the next one is sent, or 2) 
consolidate repeated mutates against the same entity into a single request to 
avoid this issue altogether. Please give this a try and let me know if you have 
any additional concerns.

Regards,
Nikisha Patel, Google Ads API Team
ref:_00D1U1174p._5001UV0nZJ:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/hGWhB0Q5YO4N00EUlKhr7ASoyJFEajm2UINw%40sfdc.net.


Re: DatabaseError.CONCURRENT_MODIFICATION error

2020-02-18 Thread Qian Huang
Hi Nikisha,

For one user list, we will add millions of users, so currently we chunk 
them into several requests, each request will contain 1000 user mutation, 
then we send these requests concurrently. 

If the concurrent modification error is happend on user list level, it 
means we can't send these request concurrently. 

But we have so many users need to add, it would be very slow if we send 
request in one thread, could you give some suggestion in this case?


Best Regards,
Qian


On Wednesday, February 19, 2020 at 2:30:00 AM UTC+8, adsapiforumadvisor 
wrote:
>
> Hello Qian,
>
> The entity in this scenario will refer to the user list that you are 
> trying to update via API for mutating members of the user list. The 
> concurrent modification error indicates that two or more processes are 
> trying to update the same user list at same instance of time. It might also 
> occur when a user in the AdWords web interface is updating the user list 
> while you are updating the same entity via the API as well. Could you 
> please confirm that even after waiting for about 30 seconds before retrying 
> the request again, the issue is still occurring? Please refer to this 
> 
>  guide 
> to avoid such error in future.
>
> Regards,
> Nikisha Patel, Google Ads API Team
>
>
> ref:_00D1U1174p._5001UV0nZJ:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/0228fc8c-7c87-4d2c-b455-42db25f00d27%40googlegroups.com.


Re: DatabaseError.CONCURRENT_MODIFICATION error

2020-02-18 Thread Google Ads API Forum Advisor Prod
Hello Qian,

The entity in this scenario will refer to the user list that you are trying to 
update via API for mutating members of the user list. The concurrent 
modification error indicates that two or more processes are trying to update 
the same user list at same instance of time. It might also occur when a user in 
the AdWords web interface is updating the user list while you are updating the 
same entity via the API as well. Could you please confirm that even after 
waiting for about 30 seconds before retrying the request again, the issue is 
still occurring? Please refer to this guide to avoid such error in future.

Regards,
Nikisha Patel, Google Ads API Team
ref:_00D1U1174p._5001UV0nZJ:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/GYYJw0Q5WU1900SFF2KerXSuGV7ZXhmxyCmg%40sfdc.net.


Re: DatabaseError.CONCURRENT_MODIFICATION error

2020-02-16 Thread Qian Huang
Hi Nikisha,

I checked change history, looks like only one script is sending request. 
However, the history are quite general, it only says: "Remarketing list 
changed", "Members are uploaded to add to this list".

Could you tell more details about that for this mutate member api, what's 
the defination of entity? in other words, on what field this concurrent 
modification happend? so we can improve our code to avoid it.

Best Regards,
Qian

On Saturday, February 15, 2020 at 4:14:07 AM UTC+8, adsapiforumadvisor 
wrote:
>
> Hello Qian,
>
> Thank you for reaching out. The CONCURRENT_MODIFICATION error is observed 
> when multiple processes are trying to make changes to a single entity at 
> once. Could you please check the Change History in the Google Ads interface 
> to verify if there were no other changes being made to the account or no 
> scripts were running in the background at the time of the mutate member 
> request? Also, you can implement the error handling model in their code to 
> handle such scenarios where partial failure should be set up and the 
> operations that failed should be retried. Please give this a try and let us 
> know if the issue persists.
>
> Regards,
> Nikisha Patel, Google Ads API Team
>
>
> ref:_00D1U1174p._5001UV0nZJ:ref
>

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/963ecab2-2404-48a8-9684-96b42d69fda5%40googlegroups.com.


RE: DatabaseError.CONCURRENT_MODIFICATION error

2020-02-14 Thread Google Ads API Forum Advisor Prod
Hello Qian,

Thank you for reaching out. The CONCURRENT_MODIFICATION error is observed when 
multiple processes are trying to make changes to a single entity at once. Could 
you please check the Change History in the Google Ads interface to verify if 
there were no other changes being made to the account or no scripts were 
running in the background at the time of the mutate member request? Also, you 
can implement the error handling model in their code to handle such scenarios 
where partial failure should be set up and the operations that failed should be 
retried. Please give this a try and let us know if the issue persists.

Regards,
Nikisha Patel, Google Ads API Team
ref:_00D1U1174p._5001UV0nZJ:ref

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1hBi00Q5PK6V00nbwaYNEUSCCMNUFPRd9A-A%40sfdc.net.


DatabaseError.CONCURRENT_MODIFICATION error

2020-02-13 Thread Qian Huang
Hi,

when I send mutateMembers requests, there are a 
lots DatabaseError.CONCURRENT_MODIFICATION error:

   
   soap:Client
   [DatabaseError.CONCURRENT_MODIFICATION @ 
com.google.ads.api.services.campaignmgmt.common.error.DatabaseError.init(Datab]

   
   https://adwords.google.com/api/adwords/cm/v201809; xmlns:ns2=
"https://adwords.google.com/api/adwords/rm/v201809;>
   [DatabaseError.CONCURRENT_MODIFICATION @ 
com.google.ads.api.services.campaignmgmt.common.error.DatabaseError.init(Datab]

   ApiException

   http://www.w3.org/2001/XMLSchema-instance; xsi:type="DatabaseError">
   
   
   DatabaseError.CONCURRENT_MODIFICATION

   DatabaseError
   CONCURRENT_MODIFICATION
   
   
   
   
   


most of my requests only wrap hashed email, hashed phoneNumber and address, 
example as below:
...
   https://adwords.google.com/api/adwords/rm/v201809;>
   
   https://adwords.google.com/api/adwords/cm/v201809;>ADD
   
   000
   false
   
   123123123123123adfadfadfadfasdf0
   asdfasdfasdfasdfasdfasdfsdf<
/hashedPhoneNumber>
   
   asdfasdfasdfasdfasdfasdfadsf
   asdfasfasdfdf12313434234<
/hashedLastName>
   ES
   123124
   
   




>From the adwords api documentation, it may happen when we modify the same 
entity concurrently.

My question is how to identify an entity in my case? or say what's the 
primary field to identify an entity?

And could you give some suggestions about how to avoid this exception?

Best Regards,
Qian

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog:
https://googleadsdeveloper.blogspot.com/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

You received this message because you are subscribed to the Google
Groups "AdWords API and Google Ads 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
--- 
You received this message because you are subscribed to the Google Groups 
"AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to adwords-api+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/adwords-api/1ace58af-00ec-4ebb-b936-3727e0a7a299%40googlegroups.com.