无论如何,在PARK(等待)状态下终止hystrix线程

时间:2018-06-27 07:09:24

标签: spring multithreading tomcat hystrix

反正有终止PARK(等待)状态的hystrix线程的情况。

我们遇到了一种奇怪的情况,因为在每个请求中,hystrix创建的线程都会增加,但永远不会终止 enter image description here

enter image description here

这是正常情况吗?

我们的hystrix配置: hystrix.properties

# hystrix steam hostname
hystrix.stream.hostname=0.0.0.0
# hystrix steam port
hystrix.stream.port=9002
# hystrix timeout
hystrix.timeout=60000

服务中的替代配置

 public MailHystrixCommand(final SendMailRequest req, String emailNotificationUrl, String hystrixGroup, int hystrixTimeout) {
    super(Setter.withGroupKey(HystrixCommandGroupKey.Factory.asKey(hystrixGroup))
        .andCommandKey(HystrixCommandKey.Factory.asKey(hystrixGroup))
        .andThreadPoolPropertiesDefaults(
            HystrixThreadPoolProperties.Setter().withMaxQueueSize(-1).withCoreSize(100))
        .andCommandPropertiesDefaults(
            HystrixCommandProperties.Setter().withCircuitBreakerRequestVolumeThreshold(10000)
                .withExecutionIsolationSemaphoreMaxConcurrentRequests(10000)
                .withFallbackIsolationSemaphoreMaxConcurrentRequests(10000)
                .withExecutionIsolationThreadTimeoutInMilliseconds(hystrixTimeout)));
    this.req = req;
    this.emailNotificationUrl = emailNotificationUrl;
  }

0 个答案:

没有答案