Azure存储容器命令运行时间过长

Kev*_*ett 6 c# azure azure-storage azure-storage-blobs

我正在使用Azure存储,并在容器上调用命令时遇到一些问题.我正在使用单元测试运行它,有时当在容器上调用命令时,它只是坐下并等待该命令将近5分钟.如果我等待足够长的时间,它将会继续并取得成功.运行此时,容器实际上确实存在,因此根本不必创建容器.

有没有其他人遇到这个问题?我试过设置一个ServerTimeout,BlobRequestOptions但它没有影响.

以下是我的代码正在做的示例:

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();
}
Run Code Online (Sandbox Code Playgroud)

我也尝试过CreateIfNotExists():

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

如果我只是尝试列出blob,它也会挂起

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

每个容器都不会发生这种情况,但是当它发生在一个容器上时,似乎是同一个容器.我检查过,容器确实存在.

maa*_*nba -2

您能否将 Fiddler 连接到设置中并查看是否从中产生任何有意义的信息?(有关设置,请参阅http://sepialabs.com/blog/2012/02/17/profiling-azure-storage-with-fiddler/ )

如果没有,我建议联系支持人员。