-
Notifications
You must be signed in to change notification settings - Fork 314
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
Authorization failed - ReadTimeout #1202
Comments
Thank you for opening this issue @AndreaGiardini. #1113 Adjusts the retry behavior for the OAUTH2.0 logic. This stack trace doesn't seem to be related to token refresh, but a timeout when communicating with GCS. Based on this data, the problem does not seem related to google-auth-library-python, but I am happy to be corrected. A possible solution could be to increase the read time out https://github.com/googleapis/google-resumable-media-python/blob/main/google/resumable_media/requests/upload.py#L48? At a glance wait_and_retry from the stacktrace doesn't seem to be retrying on a I'll try to take a deeper look later but I hope this helps move along the investigation. This issue may be more appropriate at https://github.com/googleapis/python-storage but I will wait to hear from you. |
Feel free to re-open this @AndreaGiardini ! Closing this as it has been 3 weeks with no response. |
Hello @clundin25 Sorry for the late answer... Christmas holidays :) I think the wait_and_retry function correctly retries the call here:
I've also modified the tests to use ReadTimeout rather than Timeout, and they still all pass. What do you think? |
@AndreaGiardini Hope you had a great holiday! Is it that the request is running out of retries in this scenario? Can you provide some more data as to why you believe this is an issue with the auth library? Thank you! |
Hi @AndreaGiardini, Feel free to re-open this issue if you are still facing this problem. Thanks! |
Environment details
google-auth
version: 2.14.1Steps to reproduce
We use the google-storage-python library to upload some files to GCS and, occasionally, we get errors from the google-auth library. Sometimes the run would work, sometimes a single upload would fail, sometimes multiple uploads would fail.
I've spent some time looking into the code and, while it looks like retries have been implemented in this PR ( #1113 ), I am not sure if the behavior also applies here ( https://github.com/googleapis/google-auth-library-python/blob/main/google/auth/transport/requests.py#L414-L418 ).
Why not use the default
Retry
object defined in the core-api? https://github.com/googleapis/python-storage/blob/3e4ea84163a6160703d219bea99e46b1e3965722/google/cloud/storage/retry.py#L57Any suggestion is welcome
The text was updated successfully, but these errors were encountered: