gpt4 book ai didi

java - HystrixRuntime异常 : TestCommand fallback execution rejected

转载 作者:行者123 更新时间:2023-12-01 21:18:05 24 4
gpt4 key购买 nike

我使用的是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)

最佳答案

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

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

关于java - HystrixRuntime异常 : TestCommand fallback execution rejected,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39609636/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com