首页 > 解决方案 > Neptune/Gremlin RemoteConnectionException

问题描述

在从 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()

有谁知道为什么会发生这种情况以及如何解决这个问题?

标签: javaamazon-web-servicesaws-lambdagremlin-serveramazon-neptune

解决方案


推荐阅读