Batch Job Cancelled, Internal Error

52 views
Skip to first unread message

Curtis Beck

unread,
Jul 5, 2019, 6:18:53 AM7/5/19
to AdWords API and Google Ads API Forum

Can you provide insight into why this batch was cancelled. Thank You

RuntimeError:
{
"clientCustomerId": REDACTED, 
"batchJobId": "1610987512", 
"batchJob": {
'id': 1610987512,
'status': 'CANCELED',
'progressStats': {
'numOperationsExecuted': 363682,
'numOperationsSucceeded': 363678,
'estimatedPercentExecuted': 14,
'numResultsWritten': 363682
},
'uploadUrl': None,
'downloadUrl': {
'url': 'redacted',
'expiration': '20190801 171746 America/Los_Angeles'
},
'processingErrors': [
{
'fieldPath': None,
'fieldPathElements': [],
'trigger': None,
'errorString': 'BatchJobProcessingError.INTERNAL_ERROR',
'ApiError.Type': 'BatchJobProcessingError',
'reason': 'INTERNAL_ERROR'
}
],
'diskUsageQuotaBalance': None
}
}


Google Ads API Forum Advisor Prod

unread,
Jul 8, 2019, 12:19:30 PM7/8/19
to curti...@gmail.com, adwor...@googlegroups.com
Hi Curtis,

A common cause of this error is if operations are not ordered by operation type, as described in the best practices section of our guide . Could you let me know if you're already following that recommendation?

Thanks,
Josh, Google Ads API Team

ref:_00D1U1174p._5001UCbByJ:ref

Curtis Beck

unread,
Jul 8, 2019, 12:35:26 PM7/8/19
to AdWords API and Google Ads API Forum
Thanks Josh,

Yes, the operations are ordered per the best practices section. The order of the operations performed were:

All ADD BudgetOperations followed by
All ADD CampaignOperations followed by
All ADD CampaignCriterionOperation followed by
All ADD AdGroupOperations followed by
All ADD AdGroupAdOperation followed by
All ADD AdGroupCriterionOperations

Google Ads API Forum Advisor Prod

unread,
Jul 8, 2019, 3:05:03 PM7/8/19
to curti...@gmail.com, adwor...@googlegroups.com
Hi Curtis,

Thanks for confirming and for following the guidance in the best practices section. I was able to find more information about the job in our internal logs, and it looks like there was a resource issue on our side when this job failed. Could you resubmit the failed operations for the job and let me know if you encounter further issues?

Please note that 363,862 of the operations in the job already succeeded, so you'll want to examine the contents of the job's downloadUrl in order to determine which operations you need to resubmit.

Curtis Beck

unread,
Jul 8, 2019, 5:11:24 PM7/8/19
to AdWords API and Google Ads API Forum
Thanks Josh,

The day following the failure we deleted the partially created account structure state and reran the entire batch job to successful completion.

I use batch jobs service frequently. Failing due to internal errors is not common for me, maybe happening every couple months. When failures like these are encountered, does submitting them to the forum help the dev team find issues and improve the system or are they usually already aware of them and addressing as appropriate?

Google Ads API Forum Advisor Prod

unread,
Jul 9, 2019, 10:40:08 AM7/9/19
to curti...@gmail.com, adwor...@googlegroups.com
Hi Curtis,

We have monitoring in place so we can detect situations like this and take action, so in most cases we're aware of the issue. However, it certainly doesn't hurt to post to the forum on the off chance that monitoring missed an edge case. It's also helpful for other users who have the same question or are seeing the same errors, so if you don't mind taking the time to post, please do.

Cheers,
Reply all
Reply to author
Forward
0 new messages