增加 gremlin 控制台 AWS Neptune 的空闲超时



我在 ubuntu 18 上,我总是打开 gremlin 控制台,在 i :remote 控制台之后,我运行了一些查询,然后如果我保持空闲状态 3 分钟,然后连接被断开,然后我必须退出当前连接并重新连接,这很烦人。

有没有办法增加空闲超时

基本上我需要一次又一次地输入这些命令.....

bin/gremlin.sh
:remote connect tinkerpop.server conf/neptune-remote.yaml
:remote console

看起来您要查找的是"设置"中的keepAliveInterval。 https://github.com/apache/tinkerpop/blob/6083dc4fcb214df64be72483f8779d81e73c0fac/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java#L319-L324

此密钥在 connectionPool 中连接: https://github.com/apache/tinkerpop/blob/6083dc4fcb214df64be72483f8779d81e73c0fac/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Settings.java#L236-L237

因此,正如ashoksl@评论中已经指出的那样,您需要将此设置包含在 connectionPool 下的 remotttte YAML conf 中。

像这样:

host: localhost
port: 8182
connectionPool: {
enableSsl: true
..
..
keepAliveInterval: 30000
}

您可能还想查看服务器 - 边缘乒乓球的逻辑以获取其他旋钮。 https://github.com/apache/tinkerpop/blob/ad8d663ffd957df3724c7aa8fe8bb4f893d76557/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java#L101-L110

希望这有帮助。

最新更新