GremlinServerError: 499

GremlinServerError: 499

我是 运行 AWS 上的 Neptune 服务器,正在对 jupyter notebook 中的 db ipython cell magic 进行 gremlin 查询。我进行了多次遍历 运行 并且在他们的 resultset.py 文件中收到来自 aiogoblin 的错误:GremlinServerError: 499: {"requestId":"5bb1e6ea-49ec-4a1d-9364-2b1bf717df9c","code":"InvalidParameterException","detailedMessage":"The [eval] message contains 66 bindings which is more than is allowed by the server 64 configuration"}

如何在不弹出此错误消息的情况下继续对服务器进行查询?

我认为您使用的 client/magic 存在一个已知问题,我认为它已经四年左右没有更新了。我依稀记得您可以通过在单元格中执行类似 %reset 的操作来解决它,但我真的认为您最好使用定期更新和支持的不同客户端。

您可以改为使用 Apache TinkerPop Gremlin Python 客户端(pip install gremlinpython)或尝试新的 Amazon Neptune Workbench,它提供了 %%gremlin 细胞魔法。

如果您在 Jupyter notebook 中使用 Gremlin Python 客户端,您仍然可以以几乎相同的方式发出查询,您只需要在发出 Python 基于查询。此处 [1] 有一个博客 post,您可能会感兴趣,您可以在此处 [2] 找到可用于创建包含导入和设置步骤的单元格的独立示例 Python 和这里 [3]。在示例中,您会将 localhost 替换为您的 Neptune 端点的 DNS 名称。

如果您决定尝试新的 Neptune Workbench,您可以从 AWS Neptune 控制台网页创建一个。

[1] https://aws.amazon.com/blogs/database/let-me-graph-that-for-you-part-1-air-routes/
[2] https://github.com/krlawrence/graph/blob/master/sample-code/basic-client.py
[3] https://github.com/krlawrence/graph/blob/master/sample-code/glv-client.py