This gist contains code to reproduce a memory leak in Vert.x when a SockJS client fails to disconnect cleanly. Also provided is a heap dump generated by the JVM on my laptop.
Vert.x has a memory leak in its SockJS implementation. If a SockJS client connects, subscribes to EventBus messages (via the EventBus bridge), and then disappears without closing its connection, Vert.x will continue to accumulate pending writes until memory is exhausted. I have reproduced this with multiple transports. This scenario can happen in the real world if the client has a flaky network connection, or perhaps if the user merely puts their laptop to sleep.