yanwenliang

Results 13 comments of yanwenliang

reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body ``` reactor.netty.http.client.PrematureCloseException: Connection has been closed BEFORE response, while sending request body Suppressed: reactor.core.publisher.FluxOnAssembly$OnAssemblyException: Error has been observed at...

> can you also upgrade to the latest Reactor Netty version 1.0.21 ? Ok, I'll try.

> In addition to the recommendation above, please provide more information how SCG is used. Do you use for example some caching filter etc. @violetagg This is all filters I...

> @yanwenliang Were you able to upgrade? Were you able to prepare a reproducible example? @violetagg I upgrade reactor-netty to 1.0.21, still have memory leak.

@violetagg @pderop I find the memory leak reason, it has `reactor.netty.channel.AbortedException: Connection has been closed BEFORE send operation` I add log at `org.springframework.http.server.reactive.AbstractServerHttpResponse#writeAndFlushWith` ``` @Override public final Mono writeAndFlushWith(Publisher

> @yanwenliang Please provide reproducible example. @violetagg https://github.com/yanwenliang/scg-leak-demo 1. start http-server.py 2. start spring cloud gateway with `-Dio.netty.allocator.type=unpooled -Dio.netty.maxDirectMemory=2560000 -Dio.netty.tryReflectionSetAccessible=true` 3. Use `curl localhost:8080/scg/leak` debug to pause at [reactor.netty.http.HttpOperations#send](https://github.com/reactor/reactor-netty/blob/ea64a1c5ca74fbb59af272f184b0b031f399ff5e/reactor-netty-http/src/main/java/reactor/netty/http/HttpOperations.java#L109) -...

@violetagg hello, Is there any progress on this issue? Thanks!

> in log, about request 2f764d98-2, i just find: ``` 2022-07-14 14:53:14.769 DEBUG [reactor-http-epoll-3] (Loggers.java:250) - [2f764d98-2, L:/10.xxxxx- R:10.1xxxx/10.xxxx:21784] FluxReceive{pending=0, cancelled=false, inboundDone=false, inboundError=null}: subscribing inbound receiver 2022-07-14 14:57:38.536 ERROR [reactor-http-epoll-4]...

> @yanwenliang Can you check whether you have the memory leak if you make this change in Spring Cloud Gateway > > https://github.com/spring-cloud/spring-cloud-gateway/blob/62e0f241d2aac61e699e4733ff2ed46c6865b045/spring-cloud-gateway-server/src/main/java/org/springframework/cloud/gateway/filter/NettyWriteResponseFilter.java#L124 > > `if (connection != null &&...

> @yanwenliang You closed the issue? sorry,It was a mistake.