shenyu icon indicating copy to clipboard operation
shenyu copied to clipboard

If the interface has more than 3 seconds, the gateway will fail the request

Open afumu opened this issue 3 years ago • 3 comments

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

image

image

Expected Behavior

image Theoretically I have configured 10 seconds here and the request is successful

Steps To Reproduce

  1. write an interface for more than 3 seconds (you can sleep for more than 3 seconds) image

  2. In the gateway management side in the rules to configure the timeout time of 10 seconds image

  3. 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

afumu avatar Feb 16 '22 03:02 afumu

I'll take care of it.

loongs-zhang avatar Feb 19 '22 10:02 loongs-zhang

see https://github.com/apache/incubator-shenyu/pull/2903, @zouchangfu

loongs-zhang avatar Feb 19 '22 10:02 loongs-zhang

you can config shenyu.httpclient.readTimeout in shenyu-bootstrap/src/main/resources/application.yml @zouchangfu

loongs-zhang avatar Apr 13 '22 12:04 loongs-zhang