I have a database with about 2 million nodes and transaction connections stored in a Neptune database.
I am trying two different queries with similar issues but I don't know how to solve any of them.
The first query is trying to generate a 2 hop graph starting from one user. The query is g.V(source).outE('friend').otherV().outE('friend').toList()
. For a 1 hop graph, the query works fine, but for 2 hops or more I have the following error:
gremlin_python.driver.protocol.GremlinServerError: 598: {"detailedMessage":"A timeout occurred within the script or was otherwise cancelled directly during evaluation of [1e582e78-bab5-462c-9f24-5597d53ef02f]","code":"TimeLimitExceededException","requestId":"1e582e78-bab5-462c-9f24-5597d53ef02f"}
The second query I am making is finding a path (does not need to be the shortest but just a path) from a source node to a target node. The query to do this is the following: g.V().hasId(str(source)).repeat(__.out().simplePath()).until(__.hasId(str(target))).path().limit(1).toList()
The query works for pairs of nodes that are relatively close (at most 4 hops of distance) but for further apart pairs of nodes I am getting the following error:
*** tornado.ioloop.TimeoutError: Operation timed out after 30 seconds
I was wondering if anyone might have suggestions on how to solve these Time limit errors. I would really appreciate any help with this, thanks!