Every time I close the connection to our janus db, I get the following exception:
INFO
(ConnectionPool.java:225) - Signalled closing
of connection pool on
Host{address=portal-ssl627-2.legendary-janusgraph-28.infinait.composedb.com/146.148.30.47:16138,
hostUri=wss://portal-ssl627-2.legendary-janusgraph-28.infinait.composedb.com:16138/gremlin}
with core size of 1
INFO
(Connection.java:369) - Checking for pending messages to
complete before close on org.apache.tinkerpop.gremlin.driver.Connection$CheckForPending@4b4cc069
INFO
(Connection.java:369) - Checking for pending messages to
complete before close on org.apache.tinkerpop.gremlin.driver.Connection$CheckForPending@4b4cc069
INFO
(Connection.java:369) - Checking for pending messages to
complete before close on org.apache.tinkerpop.gremlin.driver.Connection$CheckForPending@4b4cc069
INFO
(Connection.java:369) - Checking for pending messages to
complete before close on org.apache.tinkerpop.gremlin.driver.Connection$CheckForPending@4b4cc069
WARN
(Connection.java:322) - Timeout while trying to close
connection on 2a5f4ec3-e1c5-4d9c-8ee2-a08ad92d2499 - force closing - server
will close session on shutdown or expiration.
java.util.concurrent.TimeoutException
at
java.util.concurrent.CompletableFuture.timedGet(CompletableFuture.java:1771)
at
java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1915)
at
org.apache.tinkerpop.gremlin.driver.Connection.shutdown(Connection.java:317)
at
org.apache.tinkerpop.gremlin.driver.Connection.tryShutdown(Connection.java:296)
at
org.apache.tinkerpop.gremlin.driver.Connection.lambda$null$1(Connection.java:215)
at
java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
at
java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:632)
at
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at
java.util.concurrent.FutureTask.run(FutureTask.java:266)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
public class
JanusConnectionTest {
private static final
Map<String, Object> bindings;
static {
bindings = new
HashMap<String, Object>();
bindings.put("graph_name", "infinAIt");
}
public static void
main(String args[]) throws Exception {
String configFile = "conf\\compose.yaml";
Cluster cluster = Cluster.open(configFile);
Client client = cluster.connect(UUID.randomUUID().toString(),
true);
client.init();
ResultSet rs = client.submit("def
g = ConfiguredGraphFactory.open(graph_name); 0", bindings);
System.out.println(rs.one());
rs = client.submit("g.traversal().V().count()");
System.out.println(rs.one());
client.close();
cluster.close();
}
}
the yaml config file:
hosts:
[portal-ssl627-2.legendary-janusgraph-28.infinait.composedb.com]
port:
username:
password:
connectionPool: { enableSsl: true
}
serializer: { className:
org.apache.tinkerpop.gremlin.driver.ser.GryoMessageSerializerV1d0, config: { serializeResultToString: true }}
I tried 3.2.5 and 3.3.0, the exception is same.
<!-- https://mvnrepository.com/artifact/org.apache.tinkerpop/gremlin-driver
-->
<dependency>
<groupId>org.apache.tinkerpop</groupId>
<artifactId>gremlin-driver</artifactId>
<version>3.3.0</version>
</dependency>
Perhaps the incorrect close cause our server memory leak. I am grateful for all the advice.