-
Notifications
You must be signed in to change notification settings - Fork 38.6k
Description
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:
- spring-portfolio.hprof.7z (7.38 MB)
Issue Links:
- Reactor2TcpClient does not remove TcpClient instances after connection closed [SPR-14231] #18805 Reactor2TcpClient does not remove TcpClient instances after connection closed
- Reactor2StompTcpClient should use a shared EventLoopGroup [SPR-15035] #19601 Reactor2StompTcpClient should use a shared EventLoopGroup