You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by GitBox <gi...@apache.org> on 2020/09/15 09:23:56 UTC

[GitHub] [servicecomb-java-chassis] yhs0092 commented on issue #1955: 微服务调用出现低概率 连接超时io.netty.channel.ConnectTimeoutException,状态码490,服务端未收到请求。

yhs0092 commented on issue #1955:
URL: https://github.com/apache/servicecomb-java-chassis/issues/1955#issuecomment-692589833


   - consumer业务调用超时时间:`servicecomb.request.timeout`
   - client端网络连接 idle timeout:`servicecomb.rest.client.connection.idleTimeoutInSeconds`
   - server端网络连接 idle timeout:`servicecomb.rest.server.connection.idleTimeoutInSeconds`
   
   实际使用的时候注意配置 `consumer业务调用超时时间` < `client端网络连接 idle timeout` < `server端网络连接 idle timeout`。此时连接超时断连也是 client 端主动发起的,这样才能确保 consumer 调用 provider 时不会出现 client 端尝试复用的HTTP连接恰好被 server 端超时断开的情况,进而导致请求调用失败。
   至于这三个配置项之间间隔多少,建议自己摸索一下,保险一点的可以设置 10 秒以上。
   
   参考:
   - [Consumer的通用配置项](https://docs.servicecomb.io/java-chassis/zh_CN/build-consumer/common-configuration/)
   - [REST over Vertx](https://docs.servicecomb.io/java-chassis/zh_CN/transports/rest-over-vertx/)
   - [REST Transport Client 配置项](https://docs.servicecomb.io/java-chassis/zh_CN/config-reference/rest-transport-client/)
   
   **注意**:以上说明适用于 Rest over Vertx 传输方式,HTTP1.1 的场景,如果使用的是 HTTP2,或者server端传输方式选择的是 REST over Servlet,就请结合实际分析配置。


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org