Hello, I confirm that I have not violated any restrictions. In the test 
code, I only added 5 campaigns to an account, but I kept getting internal 
errors in AddBatchJobOperations. However, when I split the task into 3 and 
2 campaigns respectively, it worked fine again, which is very strange! If 
that's the case, I'll have to split all batch jobs into groups of 3, which 
is unnecessary and very slow to execute. I really need your help. If 
necessary, I can send you my code and logs via private message. I hope to 
solve this problem. Best wishes.
On Thursday, 9 March 2023 at 17:52:30 UTC+8 Google Ads API Forum Advisor 
wrote:

> Hi Jing,
>
> Thank you for getting back to us.
>
> I understand your concern, however please consider the Best Practices and 
> Limitations of Batch Processing 
> <https://developers.google.com/google-ads/api/docs/batch-processing/best-practices>.
>  
>
>    
>    - For better throughput, fewer larger jobs is preferred over many 
>    smaller jobs. 
>    - It is recommended to add no more than 1,000 operations per 
>    AddBatchJobOperationsRequest 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/BatchJobService#addbatchjoboperations>
>  and 
>    use the sequence_token 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/AddBatchJobOperationsRequest#sequence_token>
>  to 
>    upload the rest of the operations to the same job. Depending on the 
> content 
>    of the operations, too many operations in a 
>    single AddBatchJobOperationsRequest could cause a REQUEST_TOO_LARGE 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/DatabaseErrorEnum.DatabaseError#request_too_large>
>  error. 
>    You can handle this error by reducing the number of operations and 
> retrying 
>    the AddBatchJobOperationsRequest. 
>    - When submitting multiple concurrent jobs for the same account, try 
>    to reduce the likelihood of jobs operating on the same objects at the same 
>    time, while maintaining large job sizes. Many unfinished jobs (with status 
>    of RUNNING 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/BatchJobStatusEnum.BatchJobStatus#running>)
>  
>    that try to mutate the same set of objects can lead to deadlock-like 
>    conditions resulting in severe slow-down and even job failures. 
>    - Don't submit multiple operations that mutate the same object in the 
>    same job, as the result can be unpredictable. 
>    - For better throughput, order uploaded operations by operation type. 
>    For example, if your job contains operations to add campaigns, ad groups, 
>    and ad group criteria, order the operations in your upload so that all of 
>    the campaign operations 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/CampaignOperation>
>  are 
>    first, followed by all of the ad group operations 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/AdGroupOperation>,
>  
>    and finally all ad group criterion operations 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/AdGroupCriterionOperation>
>    . 
>    - Don't poll the job status too frequently or you risk hitting rate 
>    limit errors. 
>    - Don't retrieve more than 1,000 results per page. The server could 
>    return fewer than that due to load or other factors. 
>    - The results order will be the same as the upload order for batch 
>    processing. 
>    - You can set an upper bound for how long a batch job is allowed to 
>    run before being cancelled. When creating a new batch job, set the 
>    metadata.execution_limit_seconds 
>    
> <https://developers.google.com/google-ads/api/reference/rpc/v13/BatchJob.BatchJobMetadata#execution_limit_seconds>
>  field 
>    to your preferred time limit, in seconds. There is no default time limit 
>    if metadata.execution_limit_seconds is not set. 
>
>
> Furthermore, I would like you to know that we are going to delete your 
> posts here on this forum as it contains confidential information such as 
> the logs that you've provided.
>
> I hope this helps.
>
> Kind regards,
> [image: Google Logo] Google Ads API Team ​​​​​​​
>
> ref:_00D1U1174p._5004Q2jXDA8: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 
"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/c3ee67f2-7779-46d8-abed-9e3245172dccn%40googlegroups.com.
  • Ad... Jing CHEN
    • ... 'Google Ads API Forum Advisor' via Google Ads API and AdWords API Forum
      • ... Jing CHEN
        • ... Jing CHEN
          • ... Jing CHEN

Reply via email to