Failed to download large blob file on web role

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.
June 22nd, 2015 2:01am

Hi,
  
   Have you tried setting the "tasktype" attribute to background and check if that works.
   here is the article that talks about it: http://blog.smarx.com/posts/introduction-to-windows-azure-startup-tasks
  
Regards,
Nithin Rathankar
Free Windows Admin Tool Kit Click here and download it now
June 25th, 2015 5:35am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics