I'm trying to create huge group of Ads. I have configured campaigns and 
AdGroups already.
I use bulk mutate method: 
https://developers.google.com/google-ads/api/reference/rpc/v13/GoogleAdsService#mutate
 
and V13 version in dotnet client.
A single MutateGoogleAdsRequest contains 1000 AdGroupAdOperations like this:
`{
    "customerId": "12345",
    "mutateOperations": [
        {
            "adGroupAdOperation": {
                "create": {
                    "status": "ENABLED",
                    "ad": {
                        "responsiveSearchAd": {
                            "headlines": [
                                {
                                    "text": "XXXXXX"
                                },
                                .
                                .
                                .
                                {
                                    "text": "YYYYYY"
                                }
                            ],
                            "descriptions": [
                                {
                                    "text": "XXXXXX"
                                },
                                .
                                .
                                .
                                {
                                    "text": "ZZZZZZZ"
                                }
                            ],
                            "path1": "P1",
                            "path2": "P2"
                        },
                        "finalUrls": [
                            "https://samplewebsite.com/xyz";
                        ],
                        "name": "1923792"
                    },
                    "adGroup": "customers/12345/adGroups/CCCCCCCC"
                }
            }
        },
        .
        .
        .
        {
            "adGroupAdOperation": {
                "create": {
                    "status": "ENABLED",
                    "ad": {
                        "responsiveSearchAd": {
                            "headlines": [
                                {
                                    "text": "XXXXXX"
                                },
                                .
                                .
                                .
                                {
                                    "text": "YYYYYY"
                                }
                            ],
                            "descriptions": [
                                {
                                    "text": "XXXXXX"
                                },
                                .
                                .
                                .
                                {
                                    "text": "ZZZZZZZ"
                                }
                            ],
                            "path1": "P1",
                            "path2": "P2"
                        },
                        "finalUrls": [
                            "https://samplewebsite.com/xyz";
                        ],
                        "name": "1923786"
                    },
                    "adGroup": "customers/12345/adGroups/DDDDDD"
                }
            }
        }
    ],
    "partialFailure": true,
    "responseContentType": "MUTABLE_RESOURCE"
}`

*Every AdGroupAdOperation is related to unique AdGroup. So I have guarantee 
AdGroup is not shared across multiple MutateGoogleAdsRequests.*
AdGroups from AdGroupAdOperations can belong to the same Campaign.
I process multiple MutateGoogleAdsRequests in 2 threads when every thread 
process one MutateGoogleAdsRequest at time.
After few requests I get errors like this
`{
    "errorCode": {
        "databaseError": "CONCURRENT_MODIFICATION"
    },
    "message": "Multiple requests were attempting to modify the same 
resource at once. Retry the request.",
    "location": {
        "fieldPathElements": [
            {
                "fieldName": "mutate_operations",
                "index": 0
            },
            {
                "fieldName": "ad_group_ad_operation"
            }
        ]
    }
}`

When I process MutateGoogleAdsRequests in 1 thread, a problem dosen't seem 
to exist.
It seems strange because, as I wrote above, every AdGroupAdOperation is 
related to unique AdGroup.

What is the cause of error CONCURRENT_MODIFICATION?

-- 
-- 
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 
"Google Ads API and AdWords 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/c3f757c4-0924-4a58-a216-268e40030fc5n%40googlegroups.com.
  • CO... Michał Podniesiński
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum

Reply via email to