<1>通过日志发现 当控制层访问微服务的响应时间超过5秒 例: 2017-04-14 14:07:28.684 INFO 25898 --- [nio-8081-exec-2] com.zhongqi.controller.ApplyController : 入库程序运行时间: 5192ms; 就会出现 : Read timed out executing POST http://match-manager-apply/userApply/addUserCertificateList?matchId=9] with root cause <2>通过查阅资料发现是很多博主都说是 http://www./spring-cloud-feign-ribbon-first-request-fail/ 通过使用多次发现并不是断路器的问题. 通过查阅博客:发现时ribbon的配置问题 详细测试步骤参考:http:///questions/39154613/netflix-ribbon-and-hystrix-timeout 通过查找源码发现了如下的配置文件
在控制层 配置文件:application.properties 添加
就可以解决访问超时的问题。 |
|
来自: 邵飞翔 > 《Eureka服务》