504 Deadline Exceeded error

68 views
Skip to first unread message

andrew.s...@carfeine.com

unread,
Feb 28, 2019, 8:26:55 PM2/28/19
to AdWords API and Google Ads API Forum
We are getting an error when attempting any type of request to the Google Ads API.  There's not much info to go by about how to address this error.

The main error is: google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded


Below is a stack trace.  Any guidance on what to do here?

Traceback (most recent call last):  File "dev_ads.py", line 221, in <module>
    main()
  File "dev_ads.py", line 217, in main
    get_managed_customer_metricts(client, customer_id)
  File "dev_ads.py", line 190, in get_managed_customer_metricts
    for item in results:
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 204, in _items_iter
    for page in self._page_iter(increment=False):
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 235, in _page_iter
    page = self._next_page()
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/page_iterator.py", line 526, in _next_page
    response = self._method(self._request)
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/gapic_v1/method.py", line 143, in __call__
    return wrapped_func(*args, **kwargs)
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/retry.py", line 270, in retry_wrapped_func
    on_error=on_error,
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/retry.py", line 179, in retry_target
    return target()
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/timeout.py", line 214, in func_with_timeout
    return func(*args, **kwargs)
  File "/home/user/.local/share/virtualenvs/adwords-capture-sYpuCRr6/lib/python3.6/site-packages/google/api_core/grpc_helpers.py", line 59, in error_remapped_callable
    six.raise_from(exceptions.from_grpc_error(exc), exc)
  File "<string>", line 3, in raise_from
google.api_core.exceptions.DeadlineExceeded: 504 Deadline Exceeded

googleadsapi...@google.com

unread,
Mar 1, 2019, 1:08:44 PM3/1/19
to AdWords API and Google Ads API Forum
Hi Andrew,

To help me assess the issue, could you confirm if you are using the AdWords API or the Google Ads API Beta

Could you confirm if you are using a Basic Access developer token? Applying for Standard Access can help increase your rate limits and prevent the error form occurring. You could apply for Standard Access by submitting this form. After submitting, the AdWords Compliance Team will notify you regarding the status of your token within 2 business days. You may continue making your API calls once Standard Access has been approved.

However, if the API calls are made too quickly even with Standard Access, you might still get rate limit errors with ACCOUNT scope. The only workaround in that case is to slow down and wait at least until the seconds specified in the retryafterseconds in the error message. 

About the error that you have been getting, could you please confirm whether the issue is consistent? We are not aware of any issues at the moment. Our suggestion is to refer to our best practice guide to handle this situation. You could try to use the exponential backoff policy mentioned in that guide. Please let us know if you have any additional questions. 

Regards,
Dannison
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
To view this discussion on the web visit https://groups.google.com/d/msgid/adwords-api/a3fe83ba-e30f-4708-8500-60127e94b9d3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

andrew.s...@carfeine.com

unread,
Mar 1, 2019, 2:35:07 PM3/1/19
to AdWords API and Google Ads API Forum
Hello, thanks for the reply.

We are using the Google Ads API Beta, and yes we have a basic Access token so far. We are applying for the Standard Access token already.

The issue is not consistent and is definitely intermittent.  We will take a look at the rates we are making the calls.


Thanks,
Andrew

googleadsapi...@google.com

unread,
Mar 3, 2019, 8:07:30 PM3/3/19
to AdWords API and Google Ads API Forum
Hi Andrew,

After your Standard Access has been approved by the AdWords Compliance Team, you could continue making your AP service calls. Should the issue persist, feel free to write back with the new logs or screenshots of the issue so I could further investigate this.

Regards,
Dannison
AdWords API Team


=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
Also find us on our blog and discussion group:
    http://googleadsdeveloper.blogspot.com/search/label/adwords_api
    https://developers.google.com/adwords/api/community/
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~

Was your question answered? Please rate your experience with us by taking a short survey.
If not -- reply to this email and tell us what else we can do to help.

Take Survey

Also find us on our blog and discussion group:
http://googleadsdeveloper.blogspot.com/search/label/adwords_api
https://developers.google.com/adwords/api/community/

--
--
=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~
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 adwor...@googlegroups.com
To unsubscribe from this group, send email to
adwords-api+unsubscribe@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 "AdWords API and Google Ads API Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to adwords-api+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/adwords-api.
Reply all
Reply to author
Forward
0 new messages