问题描述
我正在尝试访问一个https客户端api,该api在postman(在800ms内给出响应)和本地m子流中都可以正常工作,但是在cloudhub上却不能正常工作。我收到连接超时错误。它尝试连接30秒钟(根据日志),然后发出HTTP:CONNECTIVITY错误。
I am trying to hit an https client api which is working fine on postman(gives response in 800ms) and in local mule flow but it is not working fine on cloudhub . I am getting Connect Timeout error. It tries connecting for 30 secs(as per logs) and then gives HTTP:CONNECTIVITY error.
failed: Connect timeout.
errorType=HTTP:CONNECTIVITY
cause=org.mule.extension.http.api.error.HttpRequestFailedException
我设置的响应超时为5分钟。
以前在cloudhub上部署时,该流程运行良好。几天前它停止工作,尽管我没有对代码进行任何更改。我无法调试此问题,因为它在本地环境中无法重现(效果很好)。任何帮助将不胜感激。
Response Timeout that I have set is 5 mins.The flow was working fine when deployed on cloudhub before.It stopped working a few days ago though I didn't make any changes to my code.I am unable to debug this issue as it is not reproducible on my local env(it works perfectly). Any help would be appreciated.
推荐答案
HTTP超时提供了4种不同类型的常规超时。每个都有自己的差异。
There are 4 different types of general timeouts mule HTTP calls offer. Each has its own differences.
- 连接空闲超时
- 响应超时
- 最大空闲超时时间
- 查询或事务超时(适用于数据库连接器)
- Connection Idle Timeout
- Response Timeout
- Max Idle Timeout
- Query or Transactions Timeout ( Applies for DB Connectors)
自得到以来
您的问题在于
您唯一可以尝试解决此问题的方法是通过应用连接空闲超时
和一个重新连接策略
,但存在一些频率差距。
The only possible way you could try fixing this is by Applying a Connection Idle Timeout
and a Reconnection Strategy
with some frequency gaps.
由于您对本地测试非常确定。我建议您执行以下两个步骤:
Since you are so sure about tests in local. I suggest you the below two steps:
1. Try using the same HTTP connector configuration in a separate new mule APP. Try with a simple listener and the failing requestor. Also add one more freely available online REST services into your code in other extra flow. Now try to test both. See which one is working and which is failing.
2. Check your configurations once again and make sure if your hitting the same endpoint in the cloudhub version.
最后,希望您不要在本地版本中不小心放入任何代理配置。
Finally, I hope you did not accidentally put any proxy conf in the local version.
这篇关于cloudhub上的连接超时错误:Mule版本:4.2.2的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!