记一次压测Feign调用时Hystrix could not be queued for execution and no fallback available.

项目场景:

同事压测时反馈仅支持10个用户的并发量


问题描述

通过查看日志,可以看到一下关键报错信息:
could not be queued for execution and no fallback available.

原因分析:

Hystrix默认是10个线程,超过就会报这个异常(线程池的拒绝策略)

解决方案:

修改Hystrix配置,问题解决,如下:

hystrix:
  threadpool:
    default:
      coreSize: 200 # 并发执行的最大线程数,默认10
      maxQueueSize: 200 # BlockingQueue的最大队列数
      queueSizeRejectionThreshold: 50 # 即使maxQueueSize没有达到,达到queueSizeRejectionThreshold该值后,请求也会被拒绝
      execution:
        timeout:
          enabled: true
        isolation:
          strategy: THREAD
          semaphore:
            maxConcurrentRequests: 1000
          thread:
            timeoutInMilliseconds: 30000

猜你喜欢

转载自blog.csdn.net/qq_37196265/article/details/124822071
今日推荐