0

Hystrix is not opening the circuit for the feign client. I am testing the server which is always slow with following configuration:

hystrix.circuitBreaker.requestVolumeThreshold: 4
hystrix.circuitBreaker.errorThresholdPercentage: 50
hystrix.circuitBreaker.sleepWindowInMilliseconds: 7000
hystrix.metrics.rollingStats.timeInMilliseconds: 15000
hystrix.metrics.rollingStats.numBuckets: 5
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds: 31000

feign:
    hystrix:
        enabled: true

organizationService:
  ribbon:
    MaxAutoRetries: 3
    MaxAutoRetriesNextServer: 0
    OkToRetryOnAllOperations: true
    ConnectTimeout: 10000
    ReadTimeout: 1000

I can see 4 retry and java.net.SocketTimeoutException: Read timed out error after that but when I am checking the Turbine it shows Circuit Closed for the operation.

Chandresh Mishra
  • 1,081
  • 3
  • 24
  • 45
  • what also matters is these 4 requests happened over how many seconds?. because u have specified hystrix.metrics.rollingStats.timeInMilliseconds: 15000. which means , your circuit will be open only if more than 4 requests fail within a window of 15 seconds. And also once it is open, it will be open only for 7 seconds(hystrix.circuitBreaker.sleepWindowInMilliseconds: 7000). So the question, when u check in Turbine about the circuit, are you sure you are checking at the right time – pvpkiran Jun 08 '18 at 07:59
  • 1. yes, 1 call tekes 1 sec (read time out) and 4 call happens in 4 sec. all fails. 2. I checked turbine at the same moment in another window. – Chandresh Mishra Jun 08 '18 at 12:55

0 Answers0