Skip to content

Upgrade to Reactor 2.0.7 in order to fix memory leak #4394

Closed
@daveburnsLIT

Description

@daveburnsLIT

Version : Spring Boot 1.3.0 RC1

There is a memory leak in the Stomp Relay Broker with active open stomp websocket connections. We are using a rabbitMQ backend stomp Broker. We initial noticed the memory usage pattern after running a long 10 hour endurance test.

To replicate the issue we setup a test to connect 2,000 websocket stomp connections to a RabbitMQ WebSocketMessageBroker using the Spring WebSocketStompClient. After monitoring the JVM for around 1 hour the server will either run out of memory or become unresponsive due to excessive garbage collection, then drop the connections. Profiling the JVM over this period shows a leak probably in either the reactor or netty libraries (although, afraid we’re no experts on memory leaks).

The attached sample application (based on the Spring Websocket getting started guide for the server) demonstrates the issue. The broker/server and Java Websocket clients were executed on separate machines during the test run. The WebsocketTest starts the client websocket connections.

Included in the sample app repo is the out of memory heap dump generated after a one hour test run. Also, the attached VisualVM screen shot shows the memory usage pattern where old gen memory accumulates even after all 2000 websocket clients are connected at the 6:10 marker.

stompbrokerleak

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: blockerAn issue that is blocking us from releasing

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions