简体   繁体   中英

Azure Storage container command running extremely long

I am working with Azure Storage and having some issues when calling commands on a container. I am running it with a unit test and sometimes when a command is called on a container, it just sits and waits on that command for almost 5 mins. And if I wait long enough, it will continue and succeed. When running this, the container actually does exist so it's not having to create the container at all.

Has anyone else run into this problem? I tried setting a ServerTimeout on the BlobRequestOptions but it had no affect.

Here is a sample of what my code is doing:

var blobClient = _storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference(containerName);
var options = new BlobRequestOptions() { ServerTimeout = TimeSpan.FromSeconds(10) };
if (!container.Exists(options)) //<<<<this is where it hangs
{
    container.Create();
}

I have also tried it with CreateIfNotExists() :

var blobClient = _storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference(containerName);
container.CreateIfNotExists(); //<<<this is where it hangs

It also hangs if I just try to list the blobs

var blobClient = _storageAccount.CreateCloudBlobClient();
var container = blobClient.GetContainerReference(containerName);
container.ListBlobs(); //<<<<this is where it hangs

It doesn't happen for every container but when it does happen for one, it seems to be the same one. I have checked and the container does exist.

I have reported a very similar situation: Checking if item exists in Azure blob container takes forever (SDK 2.0) . Haven't found an answer yet.

Can you hook Fiddler into the setup and see if any meaningful information comes out of that? (see http://sepialabs.com/blog/2012/02/17/profiling-azure-storage-with-fiddler/ for setting this up)

If not, I'd suggest contacting support.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM