Hystrix默认超时不起作用

问题描述 投票:1回答:1

像这样设置默认超时时间

hystrix:
  threadpool:
    default:
      coreSize: 500
      maxQueueSize: 1000
      queueSizeRejectionThreshold: 800
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 30000

色带:

ribbon:
  eager-load:
    enabled: true
    clients: dcit-auth,dcit-service-upms,dcmd-service-demand
  Httpclient:
    enabled: false
  OkHttp:
    enabled: true
  ReadTimeout: 30000
  ConnectTimeout: 30000

伪装:

feign:
  hystrix:
    enabled: true
  okhttp:
    enabled: true
  httpclient:
    enabled: false
  client:
    config:
      feignName:
        connectTimeout: 30000
        readTimeout: 30000
  compression:
    request:
      enabled: true
    response:
      enabled: true

我的服务的hystrix模因:

“ gauge.servo.hystrix.hystrixcommand.ribboncommand.myservice.propertyvalue_executiontimeoutinmilliseconds”:2000,

每次myservice响应超过2秒将返回500超时错误。

为什么不设置超时设置?

timeout hystrix netflix-ribbon feign
1个回答
0
投票

我认为您正在达到假装超时。使用feign.client.config。default代替feign.client.config。feignName将其定义为应用程序中的所有Feign Client。

© www.soinside.com 2019 - 2024. All rights reserved.