DEADLINE_EXCEEDED error

4,302 views
Skip to first unread message

Oksana Sulyma

unread,
Aug 30, 2022, 5:49:58 AM8/30/22
to Google Ads API and AdWords API Forum
Hi Google Ads support team!

I know there are a bunch of topics in this group related to DEADLINE_EXCEEDED error, but I wanted to double confirm if I'm doing everything correct in my individual case. 
First of all we have thousands of Google Ads accounts served in our app and we get errors only for a couple of accounts among all - I'll be happy to provide their ids privately.
We use https://github.com/googleads/google-ads-php and reporting API V11.

We have 'timeoutMillis' set to 120 minutes at our side. And here is what I see in our app logs, please note request times:

2022-08-25 16:07:19 Loading Ad (https://developers.google.com/google-ads/api/fields/v11/ad_group_ad report)
2022-08-25 18:07:19 Google Ads ApiException was thrown with message { "message": "Deadline Exceeded", "code": 4, "status": "DEADLINE_EXCEEDED", "details": [] } 
2022-08-25 18:07:49 Retry #1 for the error : { "message": "Deadline Exceeded", "code": 4, "status": "DEADLINE_EXCEEDED", "details": [] } 
2022-08-25 18:07:49 GoogleAdsClient build id done 2022-08-25 
18:07:49 Getting report attempt 1 : 2022-08-25 20:08:07 Google Ads ApiException was thrown with message { "message": "Deadline Exceeded", "code": 4, "status": "DEADLINE_EXCEEDED", "details": [] } 
2022-08-25 20:08:37 Retry #2 for the error : { "message": "Deadline Exceeded", "code": 4, "status": "DEADLINE_EXCEEDED", "details": [] } 
2022-08-25 20:08:38 GoogleAdsClient build id done 
2022-08-25 20:08:38 Getting report attempt 2 : 
 2022-08-25 20:10:25 MP: Start processing /mnt/efs/fetch_logs/data/adwords_data8LNjiF, rows (including headers): 330521

In other words we had one attempt to get Ads report https://developers.google.com/google-ads/api/fields/v11/ad_group_ad , waited for 2 hours, then had another attempt and report with 330,521 was created for 2 minutes. The same things could happen to other reports we get like https://developers.google.com/google-ads/api/fields/v11/keyword_view.

My question is why could this happen to reports which are relatively small? 
We've tried to reduce request date range from 60 days to 15 days and we still get the same DEADLINE_EXCEEDED error from time to time. 
What could be recommendations for us? Extend 'timeoutMillis'? Reduce 'timeoutMillis'?
Max conversions lookback for account we query is 90 days so we need 90 days of data. Will it be more preferable to request 9 reports for 10 days of 3 reports for 30 days or ...? 

Thanks in advance,
Oksana
 

Google Ads API Forum Advisor

unread,
Aug 30, 2022, 1:04:18 PM8/30/22
to adwor...@googlegroups.com

Hi,

Thank you for reaching out to us.

The error DEADLINE_EXCEEDED indicates that your request took longer than the deadline. That said, you may check this example to set custom client timeouts and this documentation for more information in timeouts. Note that you can set the timeout to 2 hours or more, but the API may still time out extremely long-running requests and return a DEADLINE_EXCEEDED error.

Timeouts are often because what is being queried is too big to send back to you. It appears that those accounts where this is failing contain a lot of data. To fix this, I would suggest you decrease the size of your data that you're requesting back by adding filtration to your queries.

For your questions, “My question is why could this happen to reports which are relatively small?, What could be recommendations for us? Extend 'timeoutMillis'? Reduce 'timeoutMillis'?, Max conversions lookback for account we query is 90 days so we need 90 days of data. Will it be more preferable to request 9 reports for 10 days of 3 reports for 30 days or ...?
-You may try first what I suggested you do in the above response. If you are still consistently encountering said error after the suggestions, then you may provide us with the complete request and response logs with the request-id , so our team can better check.

For the PHP client library, logging can be enabled by navigating to this Logging documentation.

You may then send the requested information via the Reply privately to author option. If this option is not available, you may send the details directly to our googleadsa...@google.com alias instead.

Best regards,

Google Logo
Heidi
Google Ads API Team
 


ref:_00D1U1174p._5004Q2dtHAp:ref

Oksana Sulyma

unread,
Aug 31, 2022, 4:24:51 AM8/31/22
to Google Ads API and AdWords API Forum
Thanks Heidi and team! I'll decrease request date range and will contact back if this won't help. 
Reply all
Reply to author
Forward
0 new messages