Transport Client Close causes CG overhead limit exeeded

Hello,

I encountered an issue with elasticseach transport client. When executing the close method i received the following exception:

Caused by: com.google.common.util.concurrent.ExecutionError: java.lang.OutOfMemoryError: GC overhead limit exceeded
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2201)
at com.google.common.cache.LocalCache.get(LocalCache.java:3937)
at com.google.common.cache.LocalCache.getOrLoad(LocalCache.java:3941)
at com.google.common.cache.LocalCache$LocalLoadingCache.get(LocalCache.java:4824)
at org.elasticsearch.common.inject.internal.FailableCache.get(FailableCache.java:51)
at org.elasticsearch.common.inject.MembersInjectorStore.get(MembersInjectorStore.java:68)
at org.elasticsearch.common.inject.ConstructorInjectorStore.createConstructor(ConstructorInjectorStore.java:68)
at org.elasticsearch.common.inject.ConstructorInjectorStore.access$000(ConstructorInjectorStore.java:29)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:38)
at org.elasticsearch.common.inject.ConstructorInjectorStore$1.create(ConstructorInjectorStore.java:33)
at org.elasticsearch.common.inject.internal.FailableCache$1.load(FailableCache.java:39)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
at com.google.common.cache.LocalCache$Segment.loadSync(LocalCache.java:2319)
at com.google.common.cache.LocalCache$Segment.lockedGetOrLoad(LocalCache.java:2282)
at com.google.common.cache.LocalCache$Segment.get(LocalCache.java:2197)
... 69 more

After debugging, i see that the method goes in infinite loop.

I note that i am using elasticsearch 2.4.1 with elasticsearch client provided by servicemix: org.apache.servicemix.bundles.elasticsearch: 2.3.5_1.

The code is the following:

{
TransportClient client = null;
try {
Settings settings = Settings.settingsBuilder()
.put("cluster.name", cluster).build();
client = TransportClient.builder().settings(settings).build();
client.addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(host), port))
//...
} catch (NoNodeAvailableException e) {
//.......
} catch (Exception e) {
//.......
} finally {
if (client != null) {
client.close();
}
}
}

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.