Batch Jobs started failing.

228 views
Skip to first unread message

MATTHEW Dworkin

unread,
May 6, 2022, 5:56:42 PM5/6/22
to Google Ads API and AdWords API Forum
Hello, 


Our batch jobs started failing out of nowhere. It looks like our function to fetchAndReturnResults is ending before the batch job is complete. I've tried to increase the `MAX_TOTAL_POLL_INTERVAL_SECONDS` to 180, but still no luck. Is there more latency today? 

I've provided the constants and function below:

//Constants
const POLL_FREQUENCY_SECONDS = 1;
private const MAX_TOTAL_POLL_INTERVAL_SECONDS = 180;
private const PAGE_SIZE = 1000;



function fetchAndReturnResults(
BatchJobServiceClient $batchJobServiceClient,
string $batchJobResourceName
) {
$results = [];
// Gets all the results from running batch job and print their information.
try{

$batchJobResults = $batchJobServiceClient->listBatchJobResults(
$batchJobResourceName,
['pageSize' => self::PAGE_SIZE, "responseContentType"=>2]
);

foreach ($batchJobResults->iterateAllElements() as $batchJobResult) {
$results[] = $batchJobResult;
}

return $results;
}
catch(GoogleAdsException $googleAdsException){
foreach ($googleAdsException->getGoogleAdsFailure()->getErrors() as $error) {
$results['error'][] = ['status'=>$error->getErrorCode()->getErrorCode(), 'err'=> $error->getMessage()];
}
}
catch(Exception $e){
$results['error'][] = ['status'=>$e->getCode(), 'err'=>$e->getMessage()];
}

finally {
return $results;
}
}

Right now the exception is being hit and returning an error that I can't retrieve results until batch job is finished.

This has been working for two months, so strange it would suddenly break. Should I be doing something else here?

Thanks for your help.

Best,
Matt

Narendra Mohan

unread,
May 9, 2022, 6:26:49 AM5/9/22
to Google Ads API and AdWords API Forum
We are also facing this issue. Tried increasing the  MAX_TOTAL_POLL_INTERVAL_SECONDS from 60 to 180 but no luck. Please suggest a work around.

Google Ads API Forum Advisor

unread,
May 9, 2022, 3:12:06 PM5/9/22
to adwor...@googlegroups.com
Hi All,

Thanks for reaching out. This issue is currently being investigated internally. We will provide an update as soon as we have one.

Regards,
Matt
Google Ads API Team

Google Logo
Matt
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aqXPE:ref

Google Ads API Forum Advisor

unread,
May 11, 2022, 2:30:27 PM5/11/22
to adwor...@googlegroups.com
Hi All,

Thanks for your patience on this. This issue should now be resolved. Please retry your batch job requests and let us know if the same issue reoccurs. 

Thanks,

Silvia Oggiano

unread,
May 13, 2022, 9:03:33 AM5/13/22
to Google Ads API and AdWords API Forum
Hi adsapi, 

can you confirm that the slowness problem has been solved?

Thanks
Silvia

Skander Mansouri

unread,
May 13, 2022, 9:57:15 AM5/13/22
to Google Ads API and AdWords API Forum
Hi,

As for our case, we receive an internal error when we use the addBatchJobOperations
FAILURE REQUEST SUMMARY. Method: google.ads.googleads.v9.services.BatchJobService/AddBatchJobOperations
this is the status of the response 
Status: Status{code=INTERNAL, description=Internal error encountered., cause=null}.

Can you tell us what's wrong?

Google Ads API Forum Advisor

unread,
May 18, 2022, 2:05:32 AM5/18/22
to ska...@armis.tech, adwor...@googlegroups.com
Hi All,

Thank you for raising your concern about Batch Job service.

@Silvia, so that I can investigate the issue about the slowness that you've mentioned, could you further describe how the issue has been encountered? If the issue can be seen in the API logs, then please provide the complete request and response logs with request ID and request header generated on your end.

@Skander, the INTERNAL_ERROR occurs when something unexpected happened while processing the request or the API isn't functioning correctly due to a bug. However, the API requests usually work after retrying it after 30 seconds or some times. But if the issue is occurring frequently on your end, please specify how frequent it is and please provide also the complete request and response logs with request ID and request header generated on your end.

Please provide the requested details via Reply privately to author option. If this option is not available, then send it instead on this email address googleadsa...@google.com.

Regards,
Google Logo
Ernie John
Google Ads API Team
 


ref:_00D1U1174p._5004Q2aqXPE:ref
Reply all
Reply to author
Forward
0 new messages