-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
BigQuery: Add BadGateway to DEFAULT_RETRY predicate #5918
Comments
I've patched the library at commit f3e00ad, and we're still getting BadGateways. I think it's because the BadGateway is raised before the job is done, and therefore looking at the job's errors isn't going to show BadGateway. So I believe you'll need to catch BadGateway using something like the if_exception_type method (https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/api_core/google/api_core/retry.py#L78). |
@bencaine1 Thanks for the followup. The issue is that the |
Oops, |
@bencaine1 Can you manage to trap the code when the @tswast Any clues from your side how we should be handling this? |
It could be that |
CC @shollyman |
From the error message, it looks like the body is HTML, not JSON, so probably the |
Yes, this is likely a GFE response, which means we're not going to get a structured error back. |
Thanks! We've patched this version and we haven't seen any BadGateways yet. Will keep you posted :) |
Sorry to reopen a closed issue, but we just got another BadGateway. Stack trace looks similar:
Something I just noticed about this stack trace: it's failing on this line in api_core/retry.py:
But that line is inside a try/except, where the except clause catches all Exceptions. So maybe this isn't even raising an Exception and going into the retry logic? |
@tseaver, PTAL when you get a chance. Thanks! |
@bencaine1 is your application passing a non-default |
OS: Linux dc32b7e8763a 4.9.0-6-amd64 #1 SMP Debian 4.9.82-1+deb9u3 (2018-03-02) x86_64 x86_64 x86_64 GNU/Linux
Python version: Python 2.7.6
google-cloud-bigquery: 1.5.0
I'm getting BadGateway exceptions periodically when running queries with the default retry object. Here's an example (relevant part of the stack trace):
It would be useful to add this to the DEFAULT_RETRY object in https://github.com/GoogleCloudPlatform/google-cloud-python/blob/master/bigquery/google/cloud/bigquery/retry.py.
The text was updated successfully, but these errors were encountered: