com.netflix.zuul.exception.ZuulException:转发错误

时间:2016-06-24 13:18:26

标签: netflix-zuul hystrix

我想使用Eureka服务器通过Zuul网关运行多个并发请求。

执行此操作时,我遇到此错误内部服务器错误500.欢迎任何解决方案或建议。

Caused by: com.netflix.hystrix.exception.HystrixRuntimeException: YYYYY could not acquire a semaphore for execution and no fallback available.

Caused by: java.lang.RuntimeException: could not acquire a semaphore for execution

1 个答案:

答案 0 :(得分:0)

尝试从hystrix配置中增加executionIsolationSemaphoreMaxConcurrentRequests,如下所示:

    public HystrixCommandInstance() {
      super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey("SomeGroupName"))
      .andCommandPropertiesDefaults(HystrixCommandProperties.Setter()
             .withExecutionIsolationSemaphoreMaxConcurrentRequests(200)));}