Open renjie6666 opened 8 months ago
Is this still an issue with the supported version of spring cloud 4.1.1?
Is this still an issue with the supported version of spring cloud 4.1.1?
yes, the issue still exists.
Please mainly focus on the impact of my changes to the source code NettyWriteResponseFilter
.
I added comments to the sample code.
Can you tell me how to reproduce it?
Test topology:
NettyWriteResponseFilter
)->Notes:
Connection has been closed BEFORE response, while sending request body
,Or You can supplement the logs in doOnCancel(() -> cleanup(exchange))
,which also represents a reproductionThe issue I asked is related to this one? https://github.com/reactor/reactor-netty/issues/741
Does the question subject have a solution? I have also been troubled by this issue in my project for a long time..
Describe the bug Spring Cloud Gateway version:2.2.5 reactor-netty version :0.9.15
ServerHttpResponse.writeWith(Mono<DataBuffer>
instead ofServerHttpResponse.writeWith(Flux<DataBuffer>)
inNettyWriteResponseFilter.java
in high-concurrency scenarios triggersdoOnCancel(() -> cleanup(connection))
occasionallydoOnCancel(() -> cleanup(connection))
will close the long connection between the gateway and downstream services, and this closure will not be monitored by the connection pool status, resulting in subsequent requests generating exceptionreactor.netty.channel.AbortedException: Connection has been closed BEFORE response while sending request body
Describe the solution you'd like
Sample