Тайм-аут Hystrix по умолчанию не работает

установить тайм-аут по умолчанию, как это

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.

Почему настройка тайм-аута не работает?


person Ricky Wu    schedule 13.07.2018    source источник
comment
Привет! Вы нашли какое-нибудь решение?   -  person Kadzhaev Marat    schedule 21.05.2019
comment
@KadzhaevMarat Нет, сдаюсь, и я просто обновляюсь до Spring Boot 2.0, чтобы решить эту проблему.   -  person Ricky Wu    schedule 21.05.2019


Ответы (1)


Я думаю, вы берете тайм-аут Feign. Используйте feign.client.config.default вместо feign.client.config.feignName, чтобы определить это для всех клиентов Feign в вашем приложении.

person Daniel Tonezer Mendes    schedule 09.10.2019