azure - 宇宙数据库 : TransportException - A client transport error occurred

标签 azure azure-cosmosdb azure-durable-functions

当客户端尝试查询 cosmos 时,会看到大量对象引用未设置到对象实例异常。

深入检查后,异常消息包含如下详细信息:

{
   "CPU Load History":{
      "CPU History":"(2021-10-06T19:01:18.6834408Z 82.390), (2021-10-06T19:01:28.5562209Z 89.873), (2021-10-06T19:01:42.1291501Z 93.642), (2021-10-06T19:01:52.6528941Z 90.542), (2021-10-06T19:02:02.7588327Z 90.015), (2021-10-06T19:02:16.2446310Z 91.149)"
   }
}

IsClientCpuOverloaded”:true

"TransportException":"发生客户端传输错误:请求在等待服务器响应时超时。(时间:2021-10-06T19:03:07.1867280Z,错误代码:ReceiveTimeout [0x0010]

Exception while executing function: ParseData Object reference not set to an instance of an object.{"name":"Typed FeedIterator ReadNextAsync","id":"xxx-xx-xx-x-xxxx","caller info":{"member":"OperationHelperWithRootTraceAsync","file":"ClientContextCore.cs","line":219},"start time":"07:02:25:448","duration in milliseconds":52503.1979,"data":{"Client Configuration":{"Client Created Time Utc":"2021-10-06T18:14:08.4529348Z","NumberOfClientsCreated":1,"User Agent":"cosmos-netstandard-sdk/3.19.0|3.19.1|02|X64|Microsoft Windows xx.x.xxxx|.NET Core 3.1.18|N|F 00000001|","ConnectionConfig":{"gw":"(cps:50, urto:10, p:False, httpf: False)","rntbd":"(cto: 5, icto: -1, mrpc: 30, mcpe: 65535, erd: False, pr: ReuseUnicastPort)","other":"(ed:False, be:True)"},"ConsistencyConfig":"(consistency: NotSet, prgns:[])"}},"children":[{"name":"MoveNextAsync","id":"xxxx-xx-x-fs-xxxx","caller info":{"member":"MoveNextAsync","file":"CrossPartitionRangePageAsyncEnumerator.cs","line":113}

{"ResponseTimeUTC":"2021-10-06T19:03:07.1875054Z","ResourceType":"Document","OperationType":"Query","LocationEndpoint":"xxxx.azure.com","StoreResult":{"ActivityId":"xxxx-xx-xx-x-xx","StatusCode":"Gone","SubStatusCode":"Unknown","LSN":-1,"PartitionKeyRangeId":null,"GlobalCommittedLSN":-1,"ItemLSN":-1,"UsingLocalLSN":true,"QuorumAckedLSN":-1,"SessionToken":null,"CurrentWriteQuorum":-1,"CurrentReplicaSetSize":-1,"NumberOfReadRegions":-1,"IsClientCpuOverloaded":true,"IsValid":false,"StorePhysicalAddress":xxxxx/","RequestCharge":0,"BELatencyInMs":null,"TransportException":"A client transport error occurred: The request timed out while waiting for a server response. (Time: 2021-10-06T19:03:07.1867280Z, activity ID: xxx-xx-x-xx-xx, error code: ReceiveTimeout [0x0010], base error: HRESULT 0x80131500, URI: xxxx/, connection: xx.xx.xx.xx:63676 -> xx.xx.xx.xxx:14190, payload sent: True, CPU history: (2021-10-06T18:25:38.6098171Z 100.000), (2021-10-06T18:25:53.9808590Z 95.716), (2021-10-06T18:25:58.9272146Z 59.098), (2021-10-06T18:26:15.3087856Z 91.388), (2021-10-06T18:26:18.6269463Z 96.000), (2021-10-06T18:26:28.8584330Z 85.611), CPU count: 4)

最佳答案

这是 3.20.0 中修复的错误: https://learn.microsoft.com/en-us/azure/cosmos-db/sql/sql-api-sdk-dotnet-standard#-3200---2021-06-21

Image of the change log entry with the fix

请更新到最新的 SDK 版本以避免出现这种情况。

话虽如此,这是在服务不可用错误期间发生的,请按照 https://learn.microsoft.com/en-us/azure/cosmos-db/troubleshoot-service-unavailable

从您的详细信息来看,CPU 似乎很热,您可能会遇到线程匮乏的情况:https://learn.microsoft.com/en-us/azure/cosmos-db/sql/troubleshoot-dot-net-sdk-request-timeout#high-cpu-utilization

您的 CPU 快照显示了两个问题:

Issues with CPU diagnostics

关于azure - 宇宙数据库 : TransportException - A client transport error occurred,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/69472460/

相关文章:

json - 如何将数据从 CosmosDB 中的文档传输到 Azure SQL 数据库?

c# - 如何延长使用耐用品的azure功能的超时?

azure - 在启用自动缩放之前,如何确保 Multi-Tenancy Azure 应用程序中的 Quartz.NET 调度兼容性?

azure - Cosmos DB 模拟器不工作

python - 如何将 JSON 发布到持久 Azure Function (Python)?

azure - 如何代表流将 cookie 与 Azure AD 结合使用来获取其他资源的访问 token

php - 在我的应用服务上处理文件的替代方法

Azure 管理实例学生成本

node.js - Passport-azure-ad, token 验证

azure - CosmosDB 更改源、租约和 azure 函数