1

set default timeout like this

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

Ribbon:

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:

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 metics for my service:

"gauge.servo.hystrix.hystrixcommand.ribboncommand.myservice.propertyvalue_executiontimeoutinmilliseconds": 2000,

Each time myservice response over 2s will return 500 timeout error.

Why dose the timeout setting not work?

g00glen00b
  • 41,995
  • 13
  • 95
  • 133
Ricky Wu
  • 163
  • 1
  • 2
  • 16

1 Answers1

1

I think you are hitting the Feign timeout. Use feign.client.config.default instead feign.client.config.feignName to define that to all Feign Clients in your application.