Home > Mobile >  Upload video from Xamarin app to azure blob store. Retry failed after 6 tries. Retry settings can be
Upload video from Xamarin app to azure blob store. Retry failed after 6 tries. Retry settings can be

Time:06-28

I am creating a Xamarin app that contains a functionality to upload large videos to Azure Blob Storage.

Below is the code used.

BlobClientOptions blobClientOptions = new BlobClientOptions();
blobClientOptions.Retry.NetworkTimeout = Timeout.InfiniteTimeSpan;
BlobClient blobClient = new BlobClient("ConnectionString", "ContainerName", "fileName", blobClientOptions);

//previewVideo is an array of bytes
MemoryStream memoryStream = new MemoryStream(previewVideo);

await blobClient.UploadAsync(memoryStream);

Sometimes I am getting the below error.

Retry failed after 6 tries. Retry settings can be adjusted in ClientOptions.Retry
(The operation was cancelled because it exceeded the configured timeout of 0:01:40.
Network timeout can be adjusted in ClientOptions.Retry.NetworkTimeout.)

As shown in the code above, I am setting the NetworkTimeout but it is always timing out after 100 seconds.

CodePudding user response:

As per Azure SDK on git hub, this was a know issue and it is solved last month in the last package update.

I updated the package and now the timeout property is working fine. Hence the problem is solved.

  • Related