Skip to content

Reactor2TcpClient leaks threads on shutdown [SPR-14229] #18803

@spring-projects-issues

Description

@spring-projects-issues

Roel Rymenants opened SPR-14229 and commented

When using the StompBrokerRelayMessageHandler in a container (e.g. tomcat) it seems the shutdown sequence leaks threads.
More specifically it appears to be the reconnect functionality of the used NettyTcpClients which trigger a timer on the passed reactor.Environment, which leaks a thread per client. I'm not familiar enough with neither netty nor reactor-netty to have a further clue regarding how to proceed with solving the issue.

In order to reproduce, you can switch the spring-websocket-portfolio webapp to use a StompBrokerRelay with rabbitmq. Loading the webapp in tomcat, logging in and then unloading the app again shows the issue.
You can find a heap dump attached.


Affects: 4.2.5

Reference URL: https://github.com/rstoyanchev/spring-websocket-portfolio/

Attachments:

Issue Links:

Referenced from: commits bd40a93, f7ace54

Metadata

Metadata

Assignees

Labels

in: messagingIssues in messaging modules (jms, messaging)in: webIssues in web modules (web, webmvc, webflux, websocket)type: bugA general bug

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions