关闭熔断
feign.hystrix.enabled=false
hystrix.command.default.execution.timeout.enabled=false
起因,在feign作为客户端调用的时候出现这个异常
feign.RetryableException: Read timed out executing GET
具体配置如下
bi-reporter.ribbon.listOfServers=http://localhost:8820
logging.level.root=info
http.cross.request.domain=*
eureka.client.register-with-eureka=false
eureka.client.fetch-registry=false
#建立连接超时时间
#连接超时时间
#ribbon.ReadTimeout=25000
feign.hystrix.enabled=false
hystrix.command.default.execution.timeout.enabled=false
reporter.ribbon.ReadTimeout=10000
reporter.ribbon.ConnectTimeout=3000
结论:
超时时间的优先级如下
hystrix设置的timeout > ribbon.ReadTimeout > reporter.ribbon.ReadTimeout