Spring Cloud Zuul 在版本Edgware.RELEASE斷路超時配置無法生效問題

搭建Zuul工程時,用的SpringCloud版本爲Edgware.RELEASE(沒上更高的版本,因爲部署環境tomcat和jdk的限制,更高的怕不兼容)。在改網關斷路器的超時時間時,試了各種姿勢,從zuul本身到ribbon到hystrix配置,均無法生效。試過的配置參數如下:

zuul:

zuul.retryable=true
zuul.ribbon-isolation-strategy=thread
zuul.host.connect-timeout-millis=30000
zuul.host.socket-timeout-millis=30000
ribbon:

ribbon.ReadTimeout=30000
ribbon.SocketTimeout=30000
hystrix:

hystrix.command.default.execution.timeout.enable=false
hystrix.command.default.execution.isolation.thread.timeoutInMilliseconds=60000
hystrix.command.default.execution.isolation.thread.ribbon.ReadTimeout=30000
hystrix.command.default.execution.isolation.thread.ribbon.ConnectTimeout=30000
超時設置依舊沒有成功,zuul的超時斷路依舊是默認的2s。google各種方案無解,只能降級爲Dalston.SR5。問題解決。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章