API管理服务ClientConnectionFailure在转发请求时 [英] API management service ClientConnectionFailure at forward-request

查看:127
本文介绍了API管理服务ClientConnectionFailure在转发请求时的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个Azure函数,该函数使用API​​管理服务中公开的HttpClient API调用Service Fabric API.但是API管理服务日志显示API调用失败,出现问题ID转发请求时出现ClientConnectionFailure".

I have a Azure function calling Service fabric API using HttpClient API exposed in API management service. But the API management service logs shows that the API call failed with the problem ID "ClientConnectionFailure at forward-request".

在客户端,我收到带有错误消息的System.Net.Sockets.SocketException 操作已取消.无法从传输连接中读取数据:由于线程退出或应用程序请求,I/O操作已中止.由于线程退出或线程中断,I/O操作已中止.申请请求"

On the client side I receive System.Net.Sockets.SocketException with error message "The operation was canceled. Unable to read data from the transport connection: The I/O operation has been aborted because of either a thread exit or an application request. The I/O operation has been aborted because of either a thread exit or an application request"

此失败的可能原因是什么?如何解决?不幸的是,我找不到足够的文档吗?

What are the possible reasons for this failure? How to fix it? Unfortunately I couldn't find enough documentation on this?

推荐答案

首先,您必须了解在APIM中,我们有客户端(可以是您的浏览器或任何其他工具),该APIM代理将请求转发到后端以及托管应用程序的后端.

First you have to understand that in APIM we have client which could be your browser or any other tool, the APIM proxy that forwards the requests to the back-end and the back-end that hosts your application.

客户端连接失败的原因是客户端在从APIM代理接收响应之前先断开连接.

The reason behind the client connection failure is that the client dropp the connection before receiving the response from the APIM proxy.

两个原因可能导致客户端断开连接

Two reasons might cause the client to drop the connection

  1. 由于APIM网关上的沉重负载或APIM实例所指向的后端没有足够的处理程序来处理APIM网关转发的请求,因此APIM网关需要很长时间才能做出响应超时.

  1. The APIM gateway takes long time to respond due to heavy load at the APIM gateway or the back-end the APIM instance points to does not have enough processing bower to handle the requests forwarded by the APIM gateway so the client times out.

客户端在收到来自APIM代理的响应时会出于任何原因放弃连接.

The client drops the connection for any reason while receiving the response from the APIM proxy.

您必须确定导致此问题的原因,并根据此问题做出反应,方法是修复客户端,或者对APIM或后端进行升级.

You have to identify what reason is causing this and based on that you need to react by either fixing your client or to salcale up your APIM or your back-end.

这篇关于API管理服务ClientConnectionFailure在转发请求时的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆