-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
azure storage blob download: ConnectionResetError(104, 'Connection reset by peer') #19753
Comments
Thanks for the feedback, we’ll investigate asap. |
Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage. Issue DetailsHi I installed the azure-storage-blob python sdk(12.8.1) from pip. Unable to stream download: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) Why the connection will be reset by azure? Thanks 文档详细信息⚠ 请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。
|
Hi @fengzhuye Thanks for reporting this. Is there any extra info in the stacktrace? Can you paste them here? Thanks for helping on our investigation! |
Hi @fengzhuye Can you check which version of azure-storage-blob sdk you are using? |
Hi @xiafu-msft Thanks for the reply. I am currently using version 12.8.1 Only the log message shows up, there is no stacktrace or other info. It seems the exception is already handled by the sdk. I am not aware of this error in my program. |
Hi @fengzhuye Sounds like this is not a bug, storage retry 3 times on this error, the sdk is working as expected if your blob is downloaded successfully. Let me know if you have any concern! |
Hi @xiafu-msft It's that possible "ConnectionResetError(104, 'Connection reset by peer'))" will happens 3 times? Sorry about the bothering. |
I also get this error frequently, ~2 times per day, while running code on a 15min interval on an azure functions app. The error never occurs while testing locally though. Is there a way to increase the retries? |
@tasherif-msft we should have a sample about how to setup retry policy and modify it |
Is there any update on that? Any workaround? I'm having this errors intermittently. |
@jalauzon-msft Jacob was working on this. Jacob can you please post an update here? |
Hi all, providing an update to everyone on the thread. @fengzhuye @jaymegordo @gmotasilva Connection Reset errors come from the service and there is not much that can be done to eliminate them from the client-side. The best that can be done from the client is to have retries when this error occurs. The SDK will automatically retry these errors 3 times with an exponential backoff policy. If you are seeing these errors, but retries are succeeding, then there is not much more that can be done from the client side. If, however, your operations are failing with this error after the default 3 retries there are a couple of options.
from azure.storage.blob import ExponentialRetry, BlobServiceClient
retry_policy = ExponentialRetry(
retry_total=5
)
service_client = BlobServiceClient(
'https://myaccount.blob.core.windows.net',
retry_policy=retry_policy
) The default value for We are also currently investigating why this issue seems to be happening more often in our Python SDK, when compared to our other languages. From this investigation, we may end up tweaking the default retry values or something similar. We also plan to start an internal discussion with the service team on this issue. |
Hi all, while investigating #22784 it seems there was, at one point, an issue where blob download was not properly retrying connection reset errors. I think this was addressed in a later release of |
Hi @fengzhuye. Thank you for opening this issue and giving us the opportunity to assist. We believe that this has been addressed. If you feel that further discussion is needed, please add a comment with the text “ |
/unresolved 2022-05-27T21:51:42+0000 next():186 Unable to stream download: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer')) pip3 freeze | grep azure I will try the suggested tweaks above and see how it goes. I just started see this error this week |
Hi cheryl-catalog, only the original author of the issue can ask that it be unresolved. Please open a new issue with your scenario and details if you would like to discuss this topic with the team. |
/unresolve |
Hi cheryl-catalog, only the original author of the issue can ask that it be unresolved. Please open a new issue with your scenario and details if you would like to discuss this topic with the team. |
Hi @fengzhuye, since you haven’t asked that we “ |
Hi
I installed the azure-storage-blob python sdk(12.8.1) from pip.
And setup a cron job to read all the blob files from the container, however, i find many error message from the log:
Unable to stream download: ("Connection broken: ConnectionResetError(104, 'Connection reset by peer')", ConnectionResetError(104, 'Connection reset by peer'))
Why the connection will be reset by azure?
Any feedback will be appreciated.
Thanks
Wei
文档详细信息
⚠ 请勿编辑此部分。 docs.microsoft.com ➟ GitHub 问题链接必须具有此部分。
The text was updated successfully, but these errors were encountered: