Hi,
I need to download a large blob file (>1GB) from Azure storage on the startup of a web role service. However, the web role service keep failing to start because the blob file cannot be downloaded completely. Below is my code. I tried timeout between 30 minutes to 60 hours, but still got failures. Anyone can help? Thanks a lot.
CloudBlobContainer container = BlobClient.GetContainerReference(containerString);
CloudBlockBlob blob = container.GetBlockBlobReference(blobName);
// This will override anything that already exists,
using (FileStream fs = new FileStream(fileName, FileMode.Create))
{
blob.DownloadToStream(fs, null,
new BlobRequestOptions() {ServerTimeout = timeout, MaximumExecutionTime = timeout});
} The same code works fine if I deploy the same project to my dev machine.
- Changed type Linfang Wang Monday, June 22, 2015 2:03 AM
- Edited by Linfang Wang Monday, June 22, 2015 3:50 AM