API call failed with 429 status but apparently was successfully executed

566 views
Skip to first unread message

Andrii Veretko

unread,
Apr 4, 2024, 10:32:42 AM4/4/24
to Google Ads API and AdWords API Forum
Hi, 

From time to time I'm facing an issue with POST customers.offlineUserDataJobs.run.

I'm doing an API call to run OfflineUserDataJob but getting back 429 status code. I know it means rate limit issue, so after N seconds I'm doing the re-try of this API call. But apparently I'm getting back status code 400 "Once the upload job is started, new operations cannot be added". So it appears that when I got back 429 status the API call actuaaly has been successfully completed on Google Ads API service side.

This issue causes the a lot of problems since I have to re-create whole OfflineUserDataJob and add back all the opperations into it.

I attach response messages below. It contains request IDs. Can you please check why failed with status 429 API call apparently has been completed on Google Ads side?

429 status code responce ⤵
{"error":{"code":429,"message":"Resource has been exhausted (e.g. check quota).","status":"RESOURCE_EXHAUSTED","details":[{"@type":"type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure","errors":[{"errorCode":{"quotaError":"RESOURCE_EXHAUSTED"},"message":"Too many requests. Retry in 0 seconds."}],"requestId":"kbV_977lKgA67IXLTN601w"}]}}
400 status code responce ⤵
{"error":{"code":400,"message":"Request contains an invalid argument.","status":"INVALID_ARGUMENT","details":[{"@type":"type.googleapis.com/google.ads.googleads.v15.errors.GoogleAdsFailure","errors":[{"errorCode":{"offlineUserDataJobError":"JOB_ALREADY_STARTED"},"message":"Once the upload job is started, new operations cannot be added."}],"requestId":"RLBiucuGWtyPkLyU44Z-Lg"}]}}

Google Ads API Forum Advisor

unread,
Apr 4, 2024, 5:27:11 PM4/4/24
to andr...@optimove.com, adwor...@googlegroups.com
Hi,

Thank you for contacting the Google Ads API support team.

Upon checking the error response, I understand that you are facing a RESOURCE_EXHAUSTED error when you run OfflineUserDataJob. This may be due to the fact that you have reached 1 QPS(query per second) limit which counts as 60 requests per 60 seconds. When you re-try the same API call you are encountering JOB_ALREADY_STARTED error which means that uploading job is already started. To analyse this issue further, could you provide us with the below details.
  • From when do you start encountering this error? Is this happening with every OfflineUserDataJob API call or with a specific call?
  • Could you provide us with the complete API logs (request and response with request-id and request header) generated at your end.
If you are using a client library and haven't enabled the logging yet, I would request you to enable logging for the specific client library  that you are using. You can refer to the guides Java.NetPHPPythonRuby or Perl to enable logging at your end. For REST interface requests, you can enable logging via the curl command by using the -i flag.
 
You can send the details via Reply privately to the author option, or direct private reply to this email. 
 
This message is in relation to case "ref:!00D1U01174p.!5004Q02tOr2P:ref" (ADR-00229925)

Thanks,
 
Google Logo Google Ads API Team


Andrii Veretko

unread,
Apr 5, 2024, 11:31:17 AM4/5/24
to Google Ads API and AdWords API Forum

Request IDs are provided in the initial message, response payloads also. Can't provide request payloads since it is sensetive information. I'm not using any libraries just a REST interface.

Issue happens from time to time for different audiences. 

Google Ads API Forum Advisor

unread,
Apr 5, 2024, 4:28:45 PM4/5/24
to andr...@optimove.com, adwor...@googlegroups.com
Hi,

We have only received the response body. Since you are using the customers.offlineUserDataJobs.run rest interface, kindly try making the request to that endpoint and provide us with the updated complete API logs (request and response with request-id and request header) generated at your end so that we can investigate why you are encountering the RESOURCE_EXHAUSTED  error from time to time for different audiences. 

Andrii Veretko

unread,
Apr 6, 2024, 6:41:29 PM4/6/24
to Google Ads API and AdWords API Forum
An issue is not that I'm receiving 429 RESOURCE_EXHAUSTED. I'm OK with it, since I can simply do a re-try in few seconds. An issue is that when I do the re-try Google Ads API responses me that Job has been already started but it shouldn't be started because you failed my request to start it.

Google Ads API Forum Advisor

unread,
Apr 8, 2024, 6:31:17 AM4/8/24
to andr...@optimove.com, adwor...@googlegroups.com
Hi,

Kindly note that we cannot investigate the issue without sufficient details. We need your Google Ads account Id(CID) and complete API logs to analyse further from our end. Please send these details via Reply privately to the author option, or direct private reply to this email, note that your information will be kept confidentially.
Reply all
Reply to author
Forward
0 new messages