fix(gateway): 优化网关连接池和服务端保活配置

- 配置网关HttpClient连接池max-idle-time为30s,确保小于下游服务keep-alive-timeout
- 设置网关连接超时时间为10s,响应超时时间为30s
- 配置下游服务tomcat keep-alive-timeout为60s,避免与网关连接池形成竞争条件
- 将灰度负载均衡器日志级别从warn调整为debug,减少本地开发环境日志噪音
- 添加系统性调试技能配置到Claude设置中
This commit is contained in:
2026-05-18 08:28:33 +08:00
parent bd05f6d593
commit 50b84a57bb
5 changed files with 25 additions and 3 deletions

View File

@@ -39,6 +39,11 @@
server:
port: 48081
tomcat:
# 长连接保活时长:默认沿用 connection-timeout(20s),过短会和网关侧 HttpClient 连接池形成 race
# 导致网关复用已被服务端关闭的连接抛 PrematureCloseException。
# 必须大于网关 spring.cloud.gateway.server.webflux.httpclient.pool.max-idle-time(30s)。
keep-alive-timeout: 60s
logging:
file:
name: ${user.home}/logs/${spring.application.name}.log # 日志文件名,全路径