shenyu
shenyu copied to clipboard
If the interface has more than 3 seconds, the gateway will fail the request
Is there an existing issue for this?
- [X] I have searched the existing issues
Current Behavior
If the request time of the interface exceeds 3 seconds, the request will fail
Expected Behavior
Theoretically I have configured 10 seconds here and the request is successful
Steps To Reproduce
-
write an interface for more than 3 seconds (you can sleep for more than 3 seconds)
-
In the gateway management side in the rules to configure the timeout time of 10 seconds
-
Call the interface through the gateway
Environment
ShenYu version(s):v2.4.1
Debug logs
2022-02-16 11:09:11 [reactor-http-nio-3] WARN reactor.netty.http.client.HttpClientConnect - [id: 0xc6b2d430, L:/192.168.3.104:62694 - R:/192.168.3.104:9091] The connection observed an error io.netty.handler.timeout.ReadTimeoutException: null 2022-02-16 11:09:11 [reactor-http-nio-3] ERROR com.junansec.plugin.httpclient.WebClientPlugin - null io.netty.handler.timeout.ReadTimeoutException: null 2022-02-16 11:09:11 [reactor-http-nio-3] ERROR com.junansec.gateway.handler.GlobalErrorHandler - [4afe00d1] Resolved [ReadTimeoutException: null] for HTTP GET /service1/list/123 2022-02-16 11:09:11 [reactor-http-nio-3] ERROR org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler - [4afe00d1] 500 Server Error for HTTP GET "/service1/list/123" io.netty.handler.timeout.ReadTimeoutException: null
Anything else?
No response
I'll take care of it.
see https://github.com/apache/incubator-shenyu/pull/2903, @zouchangfu
you can config shenyu.httpclient.readTimeout
in shenyu-bootstrap/src/main/resources/application.yml
@zouchangfu