从AWS Lambda调用Neptune服务器时,我经常看到此问题(以下发布了例外详细信息)。
org.apache.tinkerpop.gremlin.process.remote.RemoteConnectionException: java.lang.RuntimeException: java.lang.RuntimeException: java.util.concurrent.TimeoutException: Timed out while waiting for an available host - check the client configuration and connectivity to the server if this message persists.
有时候,我还会看到“对等连接重置”异常。
根据Neptune的最佳做法文档,我已经如下设置了Gremlin Java客户端:
Cluster
.build()
.addContactPoint(NeptuneClusterEndpoint)
.port(8182)
.maxContentLength(655360)
.maxInProcessPerConnection(32)
.maxSimultaneousUsagePerConnection(32)
.enableSsl(true)
.create()
有人知道为什么会这样以及如何解决吗?