Skip to content
This repository was archived by the owner on Aug 1, 2024. It is now read-only.
This repository was archived by the owner on Aug 1, 2024. It is now read-only.

DownloadToStream hangs indefinitely on network error #790

@martinknafvework

Description

@martinknafvework

Which service(blob, file, queue, table) does this issue concern?

Blob

Which version of the SDK was used?

9.3.2

Which platform are you using? (ex: .NET Core 2.1)

.NET Framework 4.5.2

What problem was encountered?

If I disconnect the network cable while calling DownloadToStream, the client hangs indefinitely.

How can we reproduce the problem in the simplest way?

  1. Upload a fairly large blob to blob storage.
  2. Run the following code (blockBlob is just a reference to the CloudBlockBlob uploaded in step 1).
  3. While the call to DownloadToStream is executing, disconnect the network cable.

This causes the client to hang every time I try it (I've waited 30 minutes). I have not set any default timeouts on the blob client object (using DefaultRequestOptions).

           var blobRequestOptions = new BlobRequestOptions()
              {
                 RetryPolicy = new NoRetry(),
              };
           
           using (var stream = new MemoryStream())
           {
              blockBlob.DownloadToStream(stream, null, blobRequestOptions);
           }

Have you found a mitigation/solution?

Specifying MaximumExecutionTime in the BlobRequestOptions works, but it seems incorrect that the default behavior of the client would be to hang indefinitely.

I was expecting either a default built-in per-request timeout, or being forced to specify a timeout myself. Defaulting to hanging indefinitely seems like a bug.

Maybe I'm missing something?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions