Skip to content
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

Firebase Admin not retried on auth request connection error #852

Open
al-muammar opened this issue Jan 16, 2025 · 1 comment · May be fixed by #853
Open

Firebase Admin not retried on auth request connection error #852

al-muammar opened this issue Jan 16, 2025 · 1 comment · May be fixed by #853

Comments

@al-muammar
Copy link

Even though DEFAULT_RETRY_CONFIG is good enough

DEFAULT_RETRY_CONFIG = retry.Retry(
    connect=1, read=1, status=4, status_forcelist=[500, 503],
    raise_on_status=False, backoff_factor=0.5, **_ANY_METHOD)

I'm still periodically getting ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response')). I started thinking it is very weird, because it seems that this connection error should be retried, no? It turned out, that this connection error occurs not in the request itself, which properly retries connection errors. It happens inside AuthorizedSession.credentials.before_request, which for auth requests instead of DEFAULT_RETRY_CONFIG uses

retry_adapter = requests.adapters.HTTPAdapter(max_retries=3)

I think the right approach would be to form auth_request manually with the correct retry config in HttpClient.__init__ and pass it to AuthorizedSession on creation.

What are your thoughts?

@google-oss-bot
Copy link

I couldn't figure out how to label this issue, so I've labeled it for a human to triage. Hang tight.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants