当前位置:网站首页>OpenFeign超时设置
OpenFeign超时设置
2022-04-22 06:34:00 【Leon_Jinhai_Sun】
# 0.超时说明
- 默认情况下,openFiegn在进行服务调用时,要求服务提供方处理业务逻辑时间必须在1S内返回,如果超过1S没有返回则OpenFeign会直接报错,不会等待服务执行,但是往往在处理复杂业务逻辑是可能会超过1S,因此需要修改OpenFeign的默认服务调用超时时间。
- 调用超时会出现如下错误:
# 1.模拟超时
- 服务提供方加入线程等待阻塞

# 2.进行客户端调用

# 3.修改OpenFeign默认超时时间
feign.client.config.PRODUCTS.connectTimeout=5000 #配置指定服务连接超时
feign.client.config.PRODUCTS.readTimeout=5000 #配置指定服务等待超时
#feign.client.config.default.connectTimeout=5000 #配置所有服务连接超时
#feign.client.config.default.readTimeout=5000 #配置所有服务等待超时
版权声明
本文为[Leon_Jinhai_Sun]所创,转载请带上原文链接,感谢
https://blog.csdn.net/Leon_Jinhai_Sun/article/details/124333669
边栏推荐
- Charles使用之修改请求和响应的三种方式
- 高级排序-快排
- The exchange meeting on the interpretation of the data security law and the application of security and confidentiality technology was successfully held in Beijing
- [Shiping information] solutions for confidentiality inspection and compliance control of recorded content
- Echars dynamically realizes the scatter diagram and customizes the information prompt box
- 华为手机adb devices连接设备为空
- Focus on scientific and technological innovation 𞓜 Shiping information appears in the technology roadshow of science and innovation China - special session on information technology and security
- TP5 where查询一个字段不等于多个值
- 配置自动实现CURD项目
- unittest框架
猜你喜欢
随机推荐
配置自动实现CURD项目
VS Code 设置换行
Monkey 简介操作
.NetCore设置API post方式可以直接括号内接受参数
laravel 新建路由文件
配置表及页面信息 自动生成CURD操作页面
SuperSocket在.Net5中使用——Command篇
Web automation: 5.2 selenium mouse operation principle: actionchains delay call
SuperSocket在.Net5中使用——概念篇
jmeter 模拟 get 请求
How to connect Kunlun on state │ G series screen with Siemens 300 domestic MPI adapter
Web automation: 5.1 selenium mouse operation - click, double click, right click, hover, drag
JS dynamically merge cells
How to protect personal information security@ Everyone must not miss this dry goods sharing
八阿哥纪事【三】
ADB command summary
doc、pdf转换为swf文件预览
MYSQL数据库设计规范
PHP 实现 QQ 登录
八阿哥纪事【四】








