Azure functions Cosmos DB:请求失败,因为客户端无法跨1个区域建立到1个终结点的连接

Azure functions Cosmos DB:请求失败,因为客户端无法跨1个区域建立到1个终结点的连接,azure-functions,azure-cosmosdb,Azure Functions,Azure Cosmosdb,下面是HTTP触发Azure函数的应用程序洞察中记录的异常 请求失败,因为客户端无法跨1个区域建立到1个端点的连接。客户端CPU在尝试请求期间过载 “outerId”:“0”,“message”:“响应状态代码不指示 成功:ServiceUnavailable(503);子状态:0;ActivityId: 35d16569-41da-42ed-bc5c-8f9a5c49078e;原因:(请求失败 因为客户端无法建立到1个终结点的连接 跨1个区域。客户端CPU在尝试运行期间过载 请求。\r\n活动

下面是HTTP触发Azure函数的应用程序洞察中记录的异常

请求失败,因为客户端无法跨1个区域建立到1个端点的连接。客户端CPU在尝试请求期间过载

“outerId”:“0”,“message”:“响应状态代码不指示 成功:ServiceUnavailable(503);子状态:0;ActivityId: 35d16569-41da-42ed-bc5c-8f9a5c49078e;原因:(请求失败 因为客户端无法建立到1个终结点的连接 跨1个区域。客户端CPU在尝试运行期间过载 请求。\r\n活动ID:35d16569-41da-42ed-bc5c-8f9a5c49078e,请 参见《宇宙诊断学》,Windows/10.0.14393 cosmos netstandard sdk/3.9.0);“,“parsedStack”:[{“assembly”:“Microsoft.Azure.cosmos.Client, 版本=3.9.1.0,区域性=中性, PublicKeyToken=31bf3856ad364e35,“方法”:“Microsoft.Azure.Cosmos.ResponseMessage.EnsureAccessStatusCode”,“级别”:0,“行”:0},{“程序集”:“Microsoft.Azure.Cosmos.Client, 版本=3.9.1.0,区域性=中性, PublicKeyToken=31bf3856ad364e35,“方法”:“Microsoft.Azure.Cosmos.ReadFeedResponse
1.CreateResponse”,“级别”:1,“行”:0},{“程序集”:“Microsoft.Azure.Cosmos.Client,版本=3.9.1.0,区域性=中性,PublicKeyToken=31bf3856ad364e35”,“方法”:“Microsoft.Azure.Cosmos.FeedIteratorCore
1+d_u6.MoveNext”,“级别”:2,“行”:0},{“程序集”:“System.Private.CoreLib,版本=4.0.0.0,区域性=中性, PublicKeyToken=7cec85d7bea7798e,“方法”:“System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw”,“级别”:3,“行”:0},{“程序集”:“System.Private.CoreLib, 版本=4.0.0.0,区域性=中性, PublicKeyToken=7cec85d7bea7798e,“方法”:“System.Runtime.CompilerServices.TaskWaiter.ThrowForNonSuccess”,“级别”:4,“行”:0},{“程序集”:“FleetHub.Notifications.Domain, 版本=1.0.0.0,区域性=中性, PublicKeyToken=null,“方法”:“FleetHub.Notifications.Domain.Repositories.CosmosDBRepository
1+d_uu10.MoveNext”,“级别”:5,“行”:0},{“程序集”:“System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7CECc85D7Bea7798E”,“方法”:“System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw”,“级别”:6,“行”:0},{“程序集”:”System.Private.CoreLib,版本=4.0.0.0,区域性=中性,PublicKeyToken=7cec85d7bea7798e,“方法”:“系统.运行时.编译器服务.任务等待器.ThrowForNonSuccess”,“级别”:7,“行”:0},{“程序集”:“System.Private.CoreLib,版本=4.0.0.0,区域性=中性,PublicKeyToken=7cec85d7bea7798e”,“方法”:”System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification,“级别”:8,“行”:0},{“汇编”:“FleetHub.Notifications.Queries,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”,“方法”:“FleetHub.Notifications.Queries.Handlers.RetrievenNotificationQueryHandler+dï4.MoveNext”,“级别”:9,“行”:41,“文件名”:D:\\a\\144\\s\\FleetHub.Notifications.Queries\\Handlers\\RetrieveNotificationQueryHandler.cs“},{“汇编”:“System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e”,“方法”:“System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw”,“级别”:10,“行”:0},{“汇编”:System.Private.CoreLib,版本=4.0.0.0,区域性=中性,PublicKeyToken=7cec85d7bea7798e,“方法”:“系统.运行时.编译器服务.任务等待器.ThrowForNonSuccess”,“级别”:11,“行”:0},{“程序集”:“System.Private.CoreLib,版本=4.0.0.0,区域性=中性,PublicKeyToken=7cec85d7bea7798e”,“方法”:”System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification,“级别”:12,“行”:0},{“程序集”:“FleetHub.Notifications.Queries,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”,“方法”:“FleetHub.Notifications.Queries.Handlers.RetrievenNotificationQueryHandler+d_u5.MoveNext”,“级别”:13,“行”:54,“文件名”:D:\\a\\144\\s\\FleetHub.Notifications.Queries\\Handlers\\RetrieveNotificationQueryHandler.cs“},{“汇编”:“System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e”,“方法”:“System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw”,“级别”:14,“行”:0},{“汇编”:System.Private.CoreLib,版本=4.0.0.0,区域性=中立,PublicKeyToken=7cec85d7bea7798e,“方法”:“系统.运行时.编译器服务.任务等待器.ThrowForNonSuccess”,“级别”:15,“行”:0},{“程序集”:“System.Private.CoreLib,版本=4.0.0.0,区域性=中立,PublicKeyToken=7cec85d7bea7798e”,“方法”:”System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification,“级别”:16,“行”:0},{“程序集”:“FleetHub.Notifications.Queries,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”,“方法”:“FleetHub.Notifications.Queries.Handlers.RetrievenNotificationQueryHandler+dï3.MoveNext”,“级别”:17,“行”:28,“文件名”:”D:\\a\\144\\s\\FleetHub.Notifications.Queries\\Handlers\\RetrieveNotificationQueryHandler.cs“},{“汇编”:“System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e”,“方法”:“System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw”,“级别”:18,“行”:0},{“汇编”:System.Private.CoreLib,版本=4.0.0.0,区域性=中立,PublicKeyToken=7cec85d7bea7798e,“方法”:“系统.运行时.编译器服务.任务等待器.ThrowForNonSuccess”,“级别”:19,“行”:0},{“程序集”:“System.Private.CoreLib,版本=4.0.0.0,区域性=中立,PublicKeyToken=7cec85d7bea7798e”,“方法”:”System.Runtime.CompilerServices.TaskWaiter.HandleNonSuccessAndDebuggerNotification,“级别”:20,“行”:0},{“程序集”:“FleetHub.Notifications.Azure.Functions,Version=1.0.0.0,Culture=neutral,PublicKeyToken=null”,“方法”:“FleetHub.Notifications.Azure.Functions.Notifications.RetrieveNotifications+d_0.MoveNext”,“级别”:21,“行”:39,“文件名”:D:\\a\\144\\s\\FleetHub.Notifications.Azure.Functions\\Notifications\\RetrieveNotifications.cs“},{“程序集”:“System.Private.CoreLib,Version=4.0.0.0,Culture=neutral,PublicKeyToken=7cec85d7bea7798e”,“方法”:”
public static class RetrieveNotifications
    {
        [FunctionName(nameof(RetrieveNotifications))]
        public static async Task<IActionResult> Run(
            [HttpTrigger(AuthorizationLevel.Function, "post", Route = null)] HttpRequest req,
            [Inject] ILoggingService loggingService,
            [Inject] IQueryValidator queryValidator,
            [Inject] IQueryHandler<RetrieveNotificationQuery, NotificationSummaryResponse> queryHandler)
        {
            var logger = new Logger(loggingService);

            try
            {
                logger.Info($"Retrieve Notifications request received on {nameof(RetrieveNotifications)}");

                IActionResult actionResult = null;

                string requestBody = await new StreamReader(req.Body).ReadToEndAsync();

                var query = requestBody.AsPoco<RetrieveNotificationQuery>();

                if (queryValidator.Validate<RetrieveNotificationQuery>(req, query, new RetrieveNotificationQueryValidator(), logger, ref actionResult))
                {
                    var response = await queryHandler.HandleAsync(query, logger);
                    actionResult = new OkObjectResult(response);
                }
                return actionResult;
            }
            catch (Exception ex)
            {
                logger.Error($"Exception while processing {nameof(RetrieveNotifications)}", ex,
                nameof(RetrieveNotifications));

                throw;
            }
        }
    }
The client CPU was overloaded during the attempted request