Significant increase in memory consumption StringDecoder
when splitting input by delimiters.
#31848
Labels
in: core
Issues in core modules (aop, beans, core, context, expression)
status: backported
An issue that has been backported to maintenance branches
type: regression
A bug that is also a regression
Milestone
Affects: 6.1.1
Context
I have been moving from Spring 5 to Spring 6 and I noticed some of our tests were failing with
OutOfMemoryError
I have been able to tease out smaller code sample showing the problem.The bigger picture when this is happening in our case. We have a test for processing server sent events. Our test has canned events in a single file. Our tests were creating manually response from webclient with the whole file as response body. It seems like the individual event separation by delimiter into own
DataBuffer
is causing memory consumption. Previous version (5.3.31) of Spring we were using wasn't having this behaviorReproducing example
./gradlew check
Memory flamegraphs
Spring 6.1.1 is showing following memory consuption
Spring 5.3.31
The text was updated successfully, but these errors were encountered: