ElasticSearch Java TransportClient leaking byte[]

Viewed 1306

ElasticSearch Java TransportClient 5.5.1 seems to be leaking byte arrays. Even if i just connect and close, commenting the code in between, it leaks.

The code:

try (PreBuiltTransportClient preBuiltTransportClient = new PreBuiltTransportClient(settings)) {
     try(TransportClient transportClient=preBuiltTransportClient.addTransportAddress(
            new InetSocketTransportAddress(InetAddress.getByName(endPoint),javaPort))){
         //do something
     }
}

Plugin loading log (may indicate something):

Loaded plugins log VisualVM Heap dump showing byte[] allocated size on the heap (after forcing a garbage collection):

VisualVM

Seems to be the same problem as posted here: https://discuss.elastic.co/t/are-there-memory-leaks-in-elasticsearchs-transportclient-5-4-3-or-is-my-code-flawed/91989/5

Not sure if relevant, but I am using Spring boot on the same project.

Any ideas?

EDIT:

Seems to be related to Compression:

enter image description here

EDIT2:

The memory consumption increases greatly on TransportClientNodesService.addTransportAddresses

1 Answers
Related