-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
[BUG] Azure.Identity GetTokenAsync() sporadically timing out in Azure function #23713
Comments
Thank you for your feedback. Tagging and routing to the team members best able to assist. |
Hi @erikumhoefer - I looked at the logs attached, but I'm not sure what those are from. |
I have added the AzureEventSourceListener to my function and I see its logs in insights. I'm going to wait for another failure to occur and come back with those logs, thanks! 👍 |
Looking at those new logs, I can see the token request is timing out after 100 seconds, and then failing with the exception
It will then retry the token request two more times, both timing out. After 5 minutes, the function times out. This is the info from the request being logged:
|
Hi @erikumhoefer - |
We are seeing the same issue. If happens with only a part of our function projects and the occurrence is very flaky indeed. We opened a ticket, but the response from support is very slow... Any way you can escalate this @christothes? |
@Tealons could you please link your ticket with Microsoft ? |
The ticket number is 2109140050001157. |
Hi everyone, is there any update on this issue? |
We got the response from the support team that there is a bug in some of the clusters in Azure. Apparently, the MSI endpoint on some clusters have become stuck in a faulty state induced by a high number of token requests by a site running in the cluster. The product team is aware of this and is working on a fix, but no ETA is given at this moment. The current advice is to restart your functions when this problem occurs. |
Describe the bug
We have an Azure function that is using a system assigned managed identity. When we try to request a token to access our SQL database in the same resource group, occasionally the request will get "stuck" when making the request and is unable to return the token. I have logs around this request and I see the log for starting the token request, but the log after the token request is not logged and the function times out after 5 minutes. This also makes debugging hard as there is no exception thrown by the request - the only exception is the function timeout exception.
We are also noticing long request times (2s+ compared to normal request length of < 500ms)
Expected behavior
The token request is successful and does not "hang", causing the function timeout.
Actual behavior (include Exception or Stack Trace)
Sporadically the function times out due to the request not completing.
See logs attached from insights (might not be super useful).
To Reproduce
Steps to reproduce the behavior (include a code snippet, screenshot, or any additional information that might help us reproduce the issue)
This is difficult to reproduce as it happens sporadically / inconsistently. It does not seem to be correlated with multiple concurrent requests / multiple requests in short succession. It is happened for an isolated request.
Here is the code snippet that is failing.
Environment:
I have seen some similar looking bugs that are open / have been resolved in the past that seemed to be due to deadlock. This could be a similar issue as the token request hangs indefinitely.
#14691
#22314
Logs:
tokenTimeoutLogs.csv
The text was updated successfully, but these errors were encountered: