【问题标题】:Azure Storage container command running extremely longAzure 存储容器命令运行时间极长
【发布时间】:2013-02-28 04:21:56
【问题描述】:

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

还有其他人遇到过这个问题吗?我尝试在BlobRequestOptions 上设置ServerTimeout,但没有任何影响。

这是我的代码正在执行的示例:

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();
}

我也试过CreateIfNotExists():

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

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

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

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

【问题讨论】:

  • 本地或云端配置?
  • 云配置。而且我刚刚发现它不仅仅是这两个命令,它是容器上的任何命令。我已经更新了我的问题。
  • 您是否使用过 Fiddler 或 Netmon 之类的工具来查看请求是否正在等待存储服务(即等待 HTTP 调用返回),或者延迟是否在您的应用程序中(即。没有空闲的工作线程来处理请求)?

标签: c# azure azure-storage azure-blob-storage


【解决方案1】:

我报告了一个非常相似的情况:Checking if item exists in Azure blob container takes forever (SDK 2.0)。还没找到答案。

【讨论】:

    【解决方案2】:

    你能把 Fiddler 挂到设置中,看看是否有任何有意义的信息出来吗? (请参阅http://sepialabs.com/blog/2012/02/17/profiling-azure-storage-with-fiddler/ 进行设置)

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

    【讨论】:

      猜你喜欢
      • 2019-03-08
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-08-11
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多