【发布时间】: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后端服务获取大数据,但等待响应需要很长时间。