1

I'm trying to set in application.yml the properties to set the timeout for ribbon and hystrix and I'm not able to do that. I'm always getting the same issues: "Unknown property hystrix.command" and "Unknown property ribbon.ConnectTimeout"

hystrix:
  command:
    default:
      execution:
        isolation:
          thread:
            timeoutInMilliseconds: 11000
ribbon:
  ConnectTimeout: 10000
  ReadTimeout: 10000

Using Finchley.SR1 BTW.

Always getting the same error:

2018-08-21 19:18:31.695  WARN 13534 --- [io-8765-exec-10] o.s.c.n.z.f.r.s.AbstractRibbonCommand    : The Hystrix timeout of 3000ms for the command flight-service is set lower than the combination of the Ribbon read and connect timeout, 4000ms.
2018-08-21 19:18:32.752  WARN 13534 --- [io-8765-exec-10] o.s.c.n.z.filters.post.SendErrorFilter   : Error during filtering

com.netflix.zuul.exception.ZuulException: 
    at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.findZuulException(SendErrorFilter.java:114) ~[spring-cloud-netflix-zuul-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at org.springframework.cloud.netflix.zuul.filters.post.SendErrorFilter.run(SendErrorFilter.java:76) ~[spring-cloud-netflix-zuul-2.0.1.RELEASE.jar:2.0.1.RELEASE]
    at com.netflix.zuul.ZuulFilter.runFilter(ZuulFilter.java:117) [zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.processZuulFilter(FilterProcessor.java:193) [zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.runFilters(FilterProcessor.java:157) [zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.FilterProcessor.error(FilterProcessor.java:105) [zuul-core-1.3.1.jar:1.3.1]
    at com.netflix.zuul.ZuulRunner.error(ZuulRunner.java:112) [zuul-core-1.3.1.jar:1.3.1]
g00glen00b
  • 41,995
  • 13
  • 95
  • 133
hector s.
  • 126
  • 2
  • 9

2 Answers2

0

I ran into the same error after going to Finchley. After adjusting ribbon.ConnectTimeout and ribbon.ReadTimeout, the error has disappeared.

ribbon:
  ConnectTimeout: 2000
  ReadTimeout: 2000

Try to run the load test(in jMeter for example) and see what the maximum response time from the server under the load, perhaps 10000 ms for reading and 10000 ms for the connection is not enough.

P.S

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds must be greater than ribbon.ConnectTimeout + ribbon.ReadTimeout.

0

Though it says unknown property, adding the properties in zuul gateway works fine in order to tune the timeouts. Below is the configuration I could make it to work.

hystrix.command.default.execution.timeout.enabled= true

ribbon.ReadTimeout=5000
ribbon.ConnectTimeout=5000

#(ribbon.ReadTimeout + ribbon.connectTimeout) * (1+ribbon.maxAutoRetries(default 0) * (ribbon.MaxAutoRetriesNextServer (default 1) + 1)

#timeoutInMilliseconds= (5000 + 5000) * (1+0)*(1+1) =20000

hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=21000
jizhihaoSAMA
  • 12,336
  • 9
  • 27
  • 49