Files
SOP/doc/docs/files/10113_超时设置.md
tanghc 5af379160c 4.2.6
2021-02-22 10:41:26 +08:00

467 B
Raw Blame History

超时设置

当微服务处理业务逻辑时间过长网关会报超时错误默认等待时间是5秒。

可在网关指定spring.cloud.gateway.httpclient.response-timeout参数设置超时时间,单位毫秒

# 设置响应超时10秒
spring.cloud.gateway.httpclient.response-timeout=10000

更多配置参见:org.springframework.cloud.gateway.config.HttpClientProperties

测试用例参见:com.gitee.sop.test.TimeoutTest