网关请求断开报错:Connection prematurely closed BEFORE response

在开发网关系统时遇到一个异常,即请求在响应前被提前断开。分析表明,问题源于连接池中的连接在请求未到达目标服务器时已被关闭。解决方案包括调整JVM参数,改变连接池取连接策略为LIFO,以及设置连接空闲超时时间小于后端服务的回收时间,以确保网关能先于后端服务回收连接。
摘要由CSDN通过智能技术生成

Connection prematurely closed BEFORE response reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response异常解决

一、最近在开发网关系统,就在感觉万事大吉可以上线的时候发现了如下的错误(这个是我在配置rabbitmq访问多个服务时发现的)

[box-mall-gateway:172.19.200.92:8001] 2021-06-03 18:30:53.747 ERROR 3272606 [4b62afc895661d56,4b62afc895661d56,false] [reactor-http-epoll-5] org.springframework.boot.autoconfigure.web.reactive.error.AbstractErrorWebExceptionHandler [14ed6451]  500 Server Error for HTTP POST "/open/mall/order/submitOrder"

reactor.netty.http.client.PrematureCloseException: Connection prematurely closed BEFORE response
	Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: 
Error has been observed at the following site(s):
	|_ checkpoint ⇢ com.box.mall.gateway.config.CorsConfigration$$Lambda$584/1746570062 [DefaultWebFilterChain]
	|_ checkpoint ⇢ org.springframework.cloud.gateway.filter.WeightCalculatorWebFilter [Defau
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值