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?
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
Thank you @Kelvin Lawrence. Very helpful.
My pleasure. Happy graphing :-)
I created a fresh environment with jupyter, gremlin python and now I am getting
RuntimeError: Cannot run the event loop while another loop is running
which is being propagated by tornado. Did something change ingremlinpython
in the past few weeks? I would use the%%gremlin
magic but I want to do visualizations in the notebookI am using Gremlin Python 3.4.3 and Tornado 4.5.1 with no issues in a notebook. What versions do you have installed?
I was using python3.6. But I tried with python3.5 since Python 3.4 is not available in conda. I installed version 4.5.1 tornado and also tried 3.4.5 and 3.4.4 for gremlinpython. With this installation I get
HTTP 599: Timeout while connecting
.