From 888825ba50f24fad5c5dbc609e3d6329a19cfe5b Mon Sep 17 00:00:00 2001 From: tanghc Date: Tue, 2 Mar 2021 19:03:48 +0800 Subject: [PATCH] 4.3.0 --- changelog.md | 1 + doc/docs/files/90100_常见问题.md | 8 ++++++++ .../src/main/resources/META-INF/gateway.properties | 1 + 3 files changed, 10 insertions(+) diff --git a/changelog.md b/changelog.md index b6ae81cf..6f0e378a 100644 --- a/changelog.md +++ b/changelog.md @@ -4,6 +4,7 @@ - 升级`spring-boot/spring-cloud/spring-cloud-alibaba`版本 - 修复`DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144`问题 +- 修复压测出现`ClosedChannelException`问题 ## 4.2.7 diff --git a/doc/docs/files/90100_常见问题.md b/doc/docs/files/90100_常见问题.md index 67e11668..917a2974 100644 --- a/doc/docs/files/90100_常见问题.md +++ b/doc/docs/files/90100_常见问题.md @@ -1,5 +1,13 @@ # 常见问题 +## Connection has been closed BEFORE send operation + +压测时出现`Connection has been closed BEFORE send operation`,`java.nio.channels.ClosedChannelException`之类的错误 + +- 解决办法 + +尝试调大内存分配1G或2G,`-Xms1g -Xmx1g` + ## spring cloud gateway [DataBufferLimitException: Exceeded limit on max bytes to buffer : 262144] 如果POST请求body内容太大可能会报这个错误 diff --git a/sop-gateway/src/main/resources/META-INF/gateway.properties b/sop-gateway/src/main/resources/META-INF/gateway.properties index 399730eb..04a47379 100644 --- a/sop-gateway/src/main/resources/META-INF/gateway.properties +++ b/sop-gateway/src/main/resources/META-INF/gateway.properties @@ -36,6 +36,7 @@ spring.cloud.gateway.discovery.locator.lower-case-service-id=true spring.cloud.gateway.discovery.locator.enabled=true # \u54CD\u5E94\u8D85\u65F6\uFF0C\u9ED8\u8BA410\u79D2\uFF0810000\uFF09 spring.cloud.gateway.httpclient.response-timeout=10000 +spring.cloud.gateway.httpclient.pool.max-idle-time=60000 # \u4E0D\u7528\u6539 mybatis.mapper-locations=classpath:mybatis/mapper/*.xml