Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/hibernate/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
添加新集合时对Azure Cosmos DB Emulator的要求很高_Azure_Azure Cosmosdb_Azure Cosmosdb Mongoapi - Fatal编程技术网

添加新集合时对Azure Cosmos DB Emulator的要求很高

添加新集合时对Azure Cosmos DB Emulator的要求很高,azure,azure-cosmosdb,azure-cosmosdb-mongoapi,Azure,Azure Cosmosdb,Azure Cosmosdb Mongoapi,当我尝试向数据库中添加新集合时,出现以下错误: 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

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

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

这是一个本地模拟器,在这个地区有什么高要求

CosmosDB emulator有一些限制,如果您超过这些限制,它将抛出这条通用消息

之所以会出现这种情况,是因为您试图在一个数据库中创建10个以上的集合,但也有其他原因可能会出现相同的错误

您可以根据阅读更多有关的信息。

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

因此,基本上,如果要创建更多分区集合或更多单分区集合,只需在从命令行开始时增加
PartitionCount

CosmosDB.Emulator.exe /PartitionCount=100

我的团队中的其他人不需要
CosmosDB.Emulator.exe/PartitionCount=100
就可以实现这一点。我们可以看到容器没有被创建

Microsoft解释了如何解决此问题:

  • 重置数据
  • 出口宇宙数据库
  • 转到
    %LOCALAPPDATA%\CosmosDBEmulator
    并删除所有内容
  • 重新启动你的机器

  • 您现在应该可以重试,并且所有操作都可以正常工作。

    这是指,如果您超过了为模拟器配置的最大分区数。对我来说不起作用。为什么会有限制?这不应该在开发人员机器上工作吗。。。我们已经有很多集合要测试,并且放入了很多项目。实际上,在清理和重新安装之后,它确实工作了。我尝试了250次,但计算机速度变慢,需要时间启动模拟器。所以我回到了默认值。它将消耗更多的环境资源,因为它需要为这些分区分配更多的空间和资源,这就是为什么默认值不是250。我不明白为什么它应该提前分配空间和资源。我以为这只是一个“限制”数字。无论如何,我相信微软应该重新考虑一下,在Docker中运行模拟器时,如何更改此设置?