-
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
AbortionError(code=StatusCode.UNAUTHENTICATED, details="Request had invalid authentication credentials.") #2684
Comments
@forsberg thanks for reporting! In #2683, you say
but here you're saying that retrying doesn't always work? There has been talk of exposing some of the retry methods that we use in our system tests but that hasn't completely been decided yet. It does sound like having an option for the library to handle retrying is the direction we would like to go. There are some good python retry libraries out there that will use exponential backoff to retry the request. |
@forsberg Can you explain how you are installing? |
@forsberg FWIW we've seen something similar in #1917. The issue is essentially one of timing: your token may not be expired when we check the expiry before making a request, but by the time it reaches the server, it is expired. Do you know what kind of credentials you are using? (e.g. service account or a user credentials) |
We have a very simple retry logic here - it will simply try 3 times in a row. For the problem in #2683, this seems to have done the trick. For this, it doesn't. I guess it's matter of timing. I'll make sure we do a fresh install from master without old crap lying around on Monday to see if problem still appears. Agree that having built-in retry functionality would be very convenient. Or at least have documented what kind of exceptions are worth retrying. |
And to answer your question: It's a service account. |
After fixing our borked install to use a relatively fresh master e1fbb6bc, we have not observed this particular error anymore, but we have not had it running for a very long time. I'll report back again when we've had it running for a week or so without problems. |
@forsberg Thanks for the update. This error is in some sense unavoidable because we check "is the token valid" (and here) before sending, but by the time it's sent it may have become invalid. (However, I'm fairly certain the server gives 5 minutes of wiggle room, which isn't part of the expiry so it seems "impossible".) |
Hello! :-) In this case, I have been in the process of making a radical update to the PubSub library (#3637) to add significant performance improvements and a new surface, which we hope to launch soon. As such, I am clearing out issues on the old library. It is my sincere goal to do a better job of being on top of issues in the future. As the preceding paragraph implies, I am closing this issue. If the revamped library does not solve your issue, however, please feel free to reopen. Thanks! |
Very seldom, like 9 out of 450k publish requests, we get the following error:
Retrying 2 times doesn't help, and we loose the message.
What's the recommended way of dealing with this problem? Retry until it works? Should application code have to deal with it, or is it something that should be handled automatically by SDK?
Versions, traceback etc is the same as in #2683.
The text was updated successfully, but these errors were encountered: