HystrixRuntimeException:TestCommand回退执行被拒绝

时间:2016-09-21 07:07:47

标签: java java-ee netflix hystrix

我正在使用Hystrix 1.5.5版本。当我加载1000个线程/秒的更大负载的测试时,所有请求都通过回退方法。与此同时,我也处于异常之下。为什么我得到以下异常。 Test Command是我的自定义Hystrix类

Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: TestCommand fallback execution rejected.
        at com.netflix.hystrix.AbstractCommand.handleFallbackRejectionByEmittingError(AbstractCommand.java:1026)
        at com.netflix.hystrix.AbstractCommand.getFallbackOrThrowException(AbstractCommand.java:858)
        at com.netflix.hystrix.AbstractCommand.handleThreadPoolRejectionViaFallback(AbstractCommand.java:976)
        at com.netflix.hystrix.AbstractCommand.access$400(AbstractCommand.java:59)
        at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:593)
        at com.netflix.hystrix.AbstractCommand$12.call(AbstractCommand.java:587)
        at rx.internal.operators.OperatorOnErrorResumeNextViaFunction$4.onError(OperatorOnErrorResumeNextViaFunction.java:140)
        at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:72)
        at rx.internal.operators.OperatorDoOnEach$1.onError(OperatorDoOnEach.java:72)
        at com.netflix.hystrix.AbstractCommand$HystrixObservableTimeoutOperator$3.onError(AbstractCommand.java:1173)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:54)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:30)
        at rx.internal.operators.OnSubscribeLift.call(OnSubscribeLift.java:48)

1 个答案:

答案 0 :(得分:3)

您需要检查执行和执行的maxConcurrentRequests值。倒退。以下网址讨论了这个问题。

https://github.com/Netflix/Hystrix/issues/796