11

当我尝试向数据库添加新集合时,出现此错误:

Failed to create collection 'Products'.

Error:
Sorry, we are currently experiencing high demand in this region, and cannot 
fulfill your request at this time. We work continuously to bring more and 
more capacity online, and encourage you to try again. Please do not hesitate 
to email docdbswat@microsoft.com at any time or for any reason.
ActivityId: bad1a40a-0000-0000-0000-000000000000, 
Microsoft.Azure.Documents.Common/1.22.0.0

是本地模拟器,这个地区的需求量大吗?

4

3 回答 3

14

根据官方文档

默认情况下,最多可以创建 25 个单分区集合,或使用 Azure Cosmos DB 模拟器创建 1 个分区集合。通过修改 PartitionCount 值,您可以创建最多 250 个单分区集合或 10 个分区集合,或者不超过 250 个单分区的两者的任意组合(其中 1 个分区集合 = 25 个单分区集合)。

所以基本上,如果你想创建更多分区集合或更多单分区集合,只需PartitionCount从命令行开始时增加:

CosmosDB.Emulator.exe /PartitionCount=100
于 2018-07-31T16:20:47.133 回答
3

我团队中的其他人可以在不需要CosmosDB.Emulator.exe /PartitionCount=100. 我们可以看到没有创建容器。

Microsoft 解释了如何解决此问题: https ://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#set-partitioncount

在此处输入图像描述

在此处输入图像描述

  1. 重置数据
  2. 退出 CosmosDb
  3. 转到%LOCALAPPDATA%\CosmosDBEmulator并删除所有内容
  4. 重新启动您的机器以获得良好的效果

您现在应该可以重试并且一切正常。

于 2019-04-08T09:49:17.493 回答
2

CosmosDB 模拟器有一些限制,如果超出这些限制,它会抛出一般消息。

你得到这个的原因是因为你试图在一个数据库中创建超过 10 个集合,但还有其他原因你也可能会得到同样的错误。

您可以在此处阅读有关模拟器和服务之间差异的更多信息。

于 2018-07-31T14:01:40.373 回答