首页 > 解决方案 > 无法在 Azure CosmosDB (MongoDB) 中写入

问题描述

我在 azure 中创建了一个资源作为 CosmosDB 的 MongoDB api。但是当我添加任何集合时。我收到以下错误。

OperationFailure: Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config., full error: {'ok': 0.0, 'errmsg': 'Retryable writes are not supported. Please disable retryable writes by specifying "retrywrites=false" in the connection string or an equivalent driver specific config.', 'code': 2, 'codeName': 'BadValue'}

标签: azureazure-cosmosdbazure-cosmosdb-mongoapi

解决方案


正如消息所示,我们还不支持可重试的重写。如果您在门户中为您的帐户使用连接字符串,则它具有该选项并将更正此错误。

更新:Cosmos 现在支持服务器端重试,因此这不再是问题。


推荐阅读