WSO2 API-Manager HTTP 请求在 5 分钟后终止,并出现错误 101508
我们在 WSO2 APIM 3.2.0 上部署了一个长时间运行的 HTTP 服务,大约需要6-15 分钟回复请求。为了支持长时间运行的 HTTP 调用,我们将 API 端点超时配置为 15 分钟,并将 APIM 配置为 15 分钟:
[synapse_properties]
'synapse.global_timeout_interval' = 900000
[passthru_http]
'http.socket.timeout' = 1000000
但是,总是在 5 分钟后出现以下错误:
这表明我们的后端服务正在终止连接。但是,如果我们直接调用该服务,即没有 APIM 网关,它会在 6-15 分钟后回复。我们是否错过了 APIM 中 5 分钟后完成的任何超时设置?
非常感谢您的帮助!
干杯,
塞巴斯蒂安
We deployed a long running HTTP service on WSO2 APIM 3.2.0 that needs approx. 6-15minutes to reply to a request. To support long running HTTP calls we configured the API endpoint timeouts to 15mins and also the APIM in the deployment.toml:
[synapse_properties]
'synapse.global_timeout_interval' = 900000
[passthru_http]
'http.socket.timeout' = 1000000
However, always after exactly 5 minutes we get the following error:
<am:fault xmlns:am=“http://wso2.org/apimanager”><am:code>101508</am:code><am:type>Status report</am:type><am:message>Runtime Error</am:message><am:description>Error in Sender</am:description></am:fault>
This indicates that our backend service is terminating the connection. However, if we call the service directly, i.e. without APIM Gateway it replies after 6-15min. Do we miss any timeout settings in APIM that it completes after 5mins ?
Thanks a lot for your help!
Cheers,
Sebastian
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
101508,会发生这种情况,因为后端端点超时。您可以在 wso2carbon.log 中看到端点超时的情况,并且以同样的方式,整个 HTTP 套接字也会超时。
端点超时日志示例
套接字超时示例
请检查端点和 htp.socket.timeout 值,如WSO2 文档[1]。
您应该增加上述值,该值应超过 6-15 分钟。您可以以毫秒为单位进行配置。
[1] https: //apim.docs.wso2.com/en/3.2.0/learn/design-api/endpoints/resiliency/endpoint-timeouts/
注意:套接字超时值应该大于 Synapse 全局超时和为 API 指定的任何端点超时。
101508, this will happen because the backend endpoint is getting timed out. You could see the occurrences of the endpoint time out and in the same way, the entire HTTP socket also gets timeout in the wso2carbon.log.
Sample endpoint timeout log
Sample socket timeout
Please check the endpoint and htp.socket.timeout values as mentioned in the WSO2 documentation[1].
You should increase the above values that should be more than 6-15 minutes. You can configure it in milliseconds.
[1] https://apim.docs.wso2.com/en/3.2.0/learn/design-api/endpoints/resiliency/endpoint-timeouts/
Note: The socket timeout value should be greater than both the Synapse global timeout and any endpoint timeouts given for your API.