-
Notifications
You must be signed in to change notification settings - Fork 239
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
What's the correct way to recover from an Azure Storage “connection reset” 10054 error, when called from Python SDK? #688
Comments
@rfernand2 I am transferring this issue over to the https://github.com/azure/azure-sdk-for-python repository since it is Python specific. |
OK, thanks. |
Hi Roland (@rfernand2 ), are you still hitting this issue? |
Hi @rfernand2, you have the ability to use a response hook (essentially a callback function) that would enable you to do something with the response you get before the retry is kicked off once again.
In this case the counter will keep incrementing before retrying. |
Hi @tasherif-msft, thanks for the response. I'm not sure I understand how the above code would do anything to cause the RETRY to succeed. As I mentioned above, once I see this "connection reset" error, it always fails the 25 normal retries. Is there something special about a raw_response_hook that would automatically reestablish the connection? |
Hi @rfernand2 I just noticed that you're using version 2.1.0 which has been deprecated for some time now. |
We have a python app that uses Azure Storage, calling the BlockBlobService and AppendBlobService modules of the azure-storage-blob==2.1.0 package. When running a large number of simultaneous instances of our python app, we start seeing many occurrences of the following error:
ConnectionResetError(10054, 'An existing connection was forcibly closed by the remote host', None, 10054, None))
What is the best practice for recovering from these types of errors? Our normal retry function just fails on all 25 of its retries when this error is encountered. Is there a way to request that the connection to Azure is reset within a retry function?
The text was updated successfully, but these errors were encountered: