nir*_*wal 5 azure azure-cosmosdb azure-cosmosdb-sqlapi
我们使用 cosmos DB 并评估系统在负载下的性能。当负载低至 7-9K 请求时,我们会随机收到服务当前不可用和请求超时错误。
还有其他人遇到过这个问题吗?
下面是代码
创建客户端
private void Initialize()
{
Client = new DocumentClient(new Uri(cosmosDbConfiguration.EndPoint), cosmosDbConfiguration.Key, new ConnectionPolicy
{
RetryOptions = new RetryOptions() { MaxRetryAttemptsOnThrottledRequests = 10, MaxRetryWaitTimeInSeconds = 180 },
ConnectionMode = ConnectionMode.Direct,
ConnectionProtocol = Protocol.Tcp
});
Client.OpenAsync().GetAwaiter();
CreateDatabaseIfNotExistsAsync().Wait();
CreateAllCollectionsIfNotExistsAsync().Wait();
}
Run Code Online (Sandbox Code Playgroud)
创建文档
public async Task<Document> CreateDocumentAsync<T>(string collectionName, T dataRow)
{
return await Client.CreateDocumentAsync(GetCollectionUri(collectionName), dataRow);
}
Run Code Online (Sandbox Code Playgroud)
以下是错误消息以及活动 ID
目前无法提供服务。ActivityId:6bfcabb0-69b9-4671-b2d1-8bf1a831d77e,RequestStartTime:2019-04-08T21:48:14.3002274Z,尝试的区域数量:1 ResponseTime:2019-04-08T21:48:48.3076636Z,StoreReadResult:StorePhysicalAddress : rntbd: //cdb-ms-prod-westus1-fd4.documents.azure.com:14070/apps/112e82de-8353-4f6c-804f-e6ce36a8282f/services/9f5b24ad-6517-4487-855b-ac5e507a6f53/partitions/e24c749b-c701 - 4b75-9a16-6dde04028f12/replicas/131991744298606536p/,LSN:-1,GlobalCommitedLsn:-1,PartitionKeyRangeId:,IsValid:False,StatusCode:410,IsGone:True,IsNotFound:False,IsInvalidPartition:False,RequestCharge:0,ItemLSN: -1、SessionToken:、资源类型:文档、操作类型:查询、documentdb-dotnet-sdk/2.2.1 主机/64 位 MicrosoftWindowsNT/6.2.9200.0
消息:请求超时。ActivityId:72f7f069-2376-4c71-af44-a78780e53894,请求URI:/apps/28ad6635-acc0-4a33-8cbf-513f2a7ecff0/services/9015ec89-5cc9-4a36-825d-047766c72037/partitions/bdc 49db7-9018-4dd4-9100- 52dcee4635a4/replicas/131992241935694598p/,RequestStats:RequestStartTime:2019-04-08T21:59:06.5769926Z,尝试的区域数量:1,SDK:documentdb-dotnet-sdk/2.2.1主机/64位MicrosoftWindowsNT/6.2.9200.0
归档时间: |
|
查看次数: |
4954 次 |
最近记录: |