Hystrix command fails with “timed-out and no fallback available”

感情迁移 提交于 2019-12-03 23:50:51

This is a Hystrix Command Timeout, this timeout is enabled by default per each command, you define the value using the property:

execution.isolation.thread.timeoutInMilliseconds: This property sets the time in milliseconds after which the caller will observe a timeout and walk away from the command execution. Hystrix marks > the HystrixCommand as a TIMEOUT, and performs fallback logic.

So you can increase your timeout value or disable the default time out (if apply in your case) for your command using the property:

@HystrixProperty(name = "hystrix.command.default.execution.timeout.enabled", value = "false")

You can find more information here: https://github.com/Netflix/Hystrix/wiki/Configuration#CommandExecution

It might be you are in debug or your connection too slow, default thread execution timeout is only 1 second, so you could get this message easily if you put a break-point in your command let's say

Although this is not your case but might help somebody else

Looking at the stacktrace this is an exception thrown by Hystrix after the 210 seconds you defined above.

As TimeoutException is a checked exception that needs to be declared on each method that could throw this exception. You would see this declared in the run() method of your code.

You can debug this like any other program, but be aware that the run() method runs in a thread separate from the caller. After 210 seconds the caller will just continue despite your debugging session.

You should increase ur rest client httpclient readTimeout property

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!