azure-sdk-for-python icon indicating copy to clipboard operation
azure-sdk-for-python copied to clipboard

BlobServiceClient gives timeout socket read

Open PrathamSoni opened this issue 7 months ago • 2 comments

  • Package Name: azure-storage-blob
  • Package Version: 12.19.0
  • Operating System: Mac/Linux
  • Python Version: 3.11.5

Describe the bug Have say 10-100 async blob uploads running, prolonged socket timeout errors across files.

To Reproduce Upload several large files to blob storage concurrently.

Expected behavior Files should upload.

PrathamSoni avatar Jan 10 '24 22:01 PrathamSoni

Hi @PrathamSoni, can you also provide some sample code that help the team reproduce this issue please ?

kashifkhan avatar Jan 11 '24 14:01 kashifkhan

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @xgithubtriage.

github-actions[bot] avatar Jan 11 '24 14:01 github-actions[bot]

Hi @PrathamSoni Pratham, this sounds like it's more an issue with the client machine / network being overloaded and/or caused by other external issues. Or perhaps you just start more uploads concurrently than your client machine can handle. I would definietly check the health metrics of your client machine and/or network metrics.

There isn't too much we can investigate without more information / code samples but just to share some settings that you can tweak to possibly tune the performance of the SDK. You can tune network timeouts by using the connection_timeout keyword argument on client construction (or read_timeout but that is more for download). See README.

Additionally, assuming your blobs are larger than 64 MiB in size, they will be uploaded in chunks with the default chunk size being 4 MiB. You can also tune the chunk size as well as the threashold for when chunking is performed using various keyword arguments on client construction. See the code documentation here.

Other than that please provide more info specific to your scenario as well as code samples for further investigation. Thanks.

jalauzon-msft avatar Jan 24 '24 00:01 jalauzon-msft

Hi @PrathamSoni. Thank you for opening this issue and giving us the opportunity to assist. To help our team better understand your issue and the details of your scenario please provide a response to the question asked above or the information requested above. This will help us more accurately address your issue.

github-actions[bot] avatar Jan 24 '24 00:01 github-actions[bot]

Hi @PrathamSoni, we're sending this friendly reminder because we haven't heard back from you in 7 days. We need more information about this issue to help address it. Please be sure to give us your input. If we don't hear back from you within 14 days of this comment the issue will be automatically closed. Thank you!

github-actions[bot] avatar Jan 31 '24 03:01 github-actions[bot]