feign.RetryableException: Read timed out executing xxx

时间:2019-12-23 11:46:49   收藏:0   阅读:675

技术分享图片

 

 

feign.RetryableException: Read timed out executing GET http://common-item/service/item/selectTbItemAllByPage?page=1&rows=2

 

由于Feign底层使用Ribbon调用请求,ribbon的默认超时时间为1s,所以超过1s就报错

 

解决方案:

#--------------Feign负载均衡配置 配置全局超时时间 毫秒单位   根据业务酌情配置
ribbon:
  ConnectTimeout: 5000 #请求连接的超时时间,默认时间为1秒
  ReadTimeout: 5000 #请求处理的超时时间

原文:https://www.cnblogs.com/arebirth/p/springcloudfeignreadtimedouterror.html

评论(0
© 2014 bubuko.com 版权所有 - 联系我们:wmxa8@hotmail.com
打开技术之扣,分享程序人生!