Skip to content

StringDecoder buffer leak related to maxInMemorySize limit #24339

@rstoyanchev

Description

@rstoyanchev

This was discovered while working on implementing the same type of limit for ServerSentEventsMessageReader which depends on StringDecoder to split the stream into lines (see #24312).

When a single input buffer contains multiple lines in which case slices for each line are retained, and if one of the earlier lines exceeds the limit, then subsequent lines are not released. This is due to a suspected issue with concatMapIterable not respecting doOnDiscard. I've added a reactor/reactor-core#1925 (comment) related to that.

The goal for this issue is to add a workaround.

Metadata

Metadata

Assignees

Labels

in: webIssues in web modules (web, webmvc, webflux, websocket)status: backportedAn issue that has been backported to maintenance branchestype: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions