【问题标题】:WSO2 EI how to increasing Endpoint timeout?WSO2 EI如何增加端点超时?
【发布时间】:2017-12-29 11:39:56
【问题描述】:

我已经设置了配置和端点超时,但它有以下响应。

如果我想增加端点超时应该注意什么?

<html>
    <body>
        <h1>504 Gateway Time-out</h1>
The server didn't respond in time.
    </body>
</html>

设置超时有 3 个步骤,但出现故障....

1) 在 synapse.properties (EI_HOME\conf\synapse.properties) 中定义的全局超时

synapse.global_timeout_interval=17000000

2) 在 passthru-http.properties (EI_HOME\conf\passthru-http.properties) 中定义的套接字超时

http.socket.timeout=18000000

3) 同时在 API 中设置超时。

<?xml version="1.0" encoding="UTF-8"?>
<endpoint name="ep_dsData" xmlns="http://ws.apache.org/ns/synapse">
    <http method="post" uri-template="{uri.var.origin.ds}/api/v1/GetData">
        <timeout>
            <duration>17000000</duration>
            <responseAction>fault</responseAction>
        </timeout>
    </http>
</endpoint>

【问题讨论】:

  • 您是否从客户端收到此错误?您想增加 EI 中的所有端点还是特定端点的超时时间?
  • 是的,此错误消息是对客户端的响应,我希望我可以增加所有端点的超时时间。你有什么办法解决这个问题吗?谢谢。
  • 你已经配置了超时值为5小时,有什么用例需要这个?提供一些关于客户端系统以及后端服务器或使用的服务的信息
  • 我使用外部http后端服务获取大数据,但等待响应需要很长时间。

标签: wso2 ei


【解决方案1】:

以下链接清楚地解释了在 WSO2 EI 中调整超时变量所需的配置。请再次参考。

https://docs.wso2.com/display/EI611/WSO2+Enterprise+Integrator+Best+Practices#WSO2EnterpriseIntegratorBestPractices-Workingwithendpoints

问题中分享的超时限制很不正常,5小时。

记住,以下..

  1. http.socket.timeout > max(全局端点超时,单个端点超时)。

  2. 此外,如果您在端点级别配置了超时值,则不会考虑该端点的全局超时值。对于所有其他未配置超时值的端点,将全局值视为超时值。

【讨论】:

  • 我在EI中更改了2个超时参数,如下所示。如果我设置以下参数(synapse.global_timeout_interval和http.socket.timeout)小于 60 秒,奇怪的是总是不会超过 60 秒超时。是否需要设置或更改其他参数?谢谢。参数一:synapse.global_timeout_interval(/conf/synapse.properties) 参数二:http.socket.timeout(/conf/passthru-http.properties)
  • 因为,如果您在端点级别配置了超时值,则不会考虑该端点的全局超时值 (synapse.global_timeout_interval)。尝试在端点级别更改值
  • 感谢您的建议,但我已经设置了 synapse.global_timeout_interval = 300000、http.socket.timeout = 600000 和端点级别的超时参数(连接操作超时 = 永不超时)...它总是不会超过60秒超时...如果超过60秒,客户端将响应错误消息:

    504 Gateway Time-out

    服务器没有及时响应。
  • 由于http socket超时时间指定为60秒,客户端报错是有道理的,连接socket会被wso2终止
  • 我删除了EI文件重新安装,它可以工作....谢谢你的帮助。
猜你喜欢
  • 1970-01-01
  • 2019-04-29
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2021-01-03
  • 2021-03-01
  • 1970-01-01
  • 1970-01-01
相关资源
最近更新 更多