Warm tip: This article is reproduced from stackoverflow.com, please click
amazon-neptune gremlin tinkerpop gremlinpython

GremlinServerError: 499

发布于 2020-04-08 09:27:44

I am running a Neptune Server on AWS and making gremlin queries to the db ipython cell magic in an jupyter notebook. I've got a number of traversals running and I am getting an error that is coming from aiogoblin in their resultset.py file: 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"}

How can I make continued queries against the server without this error message popping up?

Questioner
Justin Gerard
Viewed
42
Kelvin Lawrence 2020-02-01 23:33

I believe there was a known issue with the client/magic you are using and I don't think it has been updated in four years or so. I vaguely remember you could work around it by doing something like %reset in the cell but I really think you would be better off using a different client that is regularly updated and supported.

You could instead use the Apache TinkerPop Gremlin Python client (pip install gremlinpython) or try the new Amazon Neptune Workbench which offers a %%gremlin cell magic.

If you use the Gremlin Python client in a Jupyter notebook you can still issue queries in much the same way, you would just need to establish a connection to the server in a cell before issuing Python based queries. There is a blog post that may be of interest located here [1] and a stand alone Python example you could use to create a cell containing the imports and setup steps can be found here [2] and here [3]. In the sample you would replace localhost with the DNS name of your Neptune endpoint.

If you decide to try the new Neptune Workbench you can create one from the AWS Neptune Console web page.

[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