WSO2 API-Manager HTTP 请求在 5 分钟后终止,并出现错误 101508

发布于 2025-01-09 18:52:23 字数 633 浏览 5 评论 0原文

我们在 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 分钟后出现以下错误:

101508状态报告运行时错误发件人错误

这表明我们的后端服务正在终止连接。但是,如果我们直接调用该服务,即没有 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你不是我要的菜∠ 2025-01-16 18:52:23

101508,会发生这种情况,因为后端端点超时。您可以在 wso2carbon.log 中看到端点超时的情况,并且以同样的方式,整个 HTTP 套接字也会超时。

端点超时日志示例

TID: [-1234] [] [2022-02-22 21:30:43,187]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Endpoint : <ENDPOINT> will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}

套接字超时示例

TID: [-1] [] [2022-02-22 21:30:43,186]  WARN {org.apache.synapse.transport.passthru.TargetHandler} -  Connection closed by target host before receiving the response {org.apache.synapse.transport.passthru.TargetHandler

请检查端点和 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

TID: [-1234] [] [2022-02-22 21:30:43,187]  WARN {org.apache.synapse.endpoints.EndpointContext} -  Endpoint : <ENDPOINT> will be marked SUSPENDED as it failed {org.apache.synapse.endpoints.EndpointContext}

Sample socket timeout

TID: [-1] [] [2022-02-22 21:30:43,186]  WARN {org.apache.synapse.transport.passthru.TargetHandler} -  Connection closed by target host before receiving the response {org.apache.synapse.transport.passthru.TargetHandler

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文