Closed kad-koninr1 closed 1 month ago
The dependency which contains the code above uses spring-boot-starter-parent 3.3.4 as a parent. But the service that uses the dependency was on an older version. After changing it to 3.3.4 the memory leak is gone. I am pretty the fix for issue #33094 is what fixed it.
Closing this issue.
Thanks for letting us know.
When using WebClient with codec MultipartHttpMessageReader/DefaultPartHttpMessageReader parts that only consist of a new line will cause a memory leak in direct memory. The corresponding Netty ByteBuf will not be released.
The extra new line (CR + LF) in part "text-part" causes the memory leak. When any amount of characters are added to this line the MultiPartParser will detect it as content and does release ByteBuf.