Full repeating traversal

113 views
Skip to first unread message

Neelima Tula

unread,
May 26, 2022, 6:13:27 AM5/26/22
to Gremlin-users
Hi Team,

I am working on a complex graph data that has central node and multiple nodes connected to it and further connected to multiple nodes and so on.
I would like to traverse through a complete path from central node to end.

I am using the query:
%%gremlin
g.V('12345').repeat(bothE().otherV()).simplePath().path()

and it throws below error:
     "code": "MemoryLimitExceededException",
     "requestId": "c83563f5-821b-45a3-8503-694617e4bec7",
     "detailedMessage": "Query cannot be completed due to memory limitations."
 }

How can I traverse a complete path and get the results without the memory error? Any help is greatly appreciated.

Thanks.

This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely for the use of the addressee(s). If you are not the intended recipient, please notify the sender by e-mail and delete the original message. Further, you are not to copy, disclose, or distribute this e-mail or its contents to any other person and any such actions maybe unlawful. This e-mail may contain viruses. Provenir has taken every reasonable precaution to minimize this risk, but is not liable for any damage you may sustain as a result of any virus in this e-mail. You should carry out your own virus checks before opening the e-mail or attachment. Provenir reserves the right to monitor and review the content of all messages sent to or from this e-mail address. Messages sent to or from this e-mail address may be stored on the Provenir e-mail system.

Neelima Tula

unread,
May 26, 2022, 6:22:42 AM5/26/22
to Gremlin-users
I am running Gremlin queries in Jupyter notebook. Not sure if the error is related to Jupyter or Gremlin or Neptune.

Thanks.

Kelvin Lawrence

unread,
May 27, 2022, 2:06:57 PM5/27/22
to Gremlin-users
You have not given your repeat loop any kind of termination condition so it is going to try to find every possible path from that given start point while obeying the simplePath requirement.

Cheers
Kelvin

Kelvin Lawrence

unread,
May 27, 2022, 2:12:26 PM5/27/22
to Gremlin-users
You could try adding a limit(1) to see if it works or adding an until condition to tell repeat when to stop.

What size of Neptune instance are you using?

Cheers
Kelvin

Neelima Tula

unread,
May 30, 2022, 9:23:12 AM5/30/22
to gremli...@googlegroups.com

Thank you Kelvin for the response.

 

The problem I have got is, I don’t know how many times to repeat the traversal. From manual observation, the query works when repeated 6 times (i.e, when I mention times(6)) for this specific ID.

I can’t specify any ‘until’ condition as I don’t know where the starting node traverses through.

 

I have got millions of IDs which are connected to other multiple nodes and which are further connected to multiple nodes and so on. I want to traverse the path through each of the IDs (see where the path ends) and work on centrality calculations of the nodes associated within the graphs of individual IDs.

Is there a way, I can implement this?

 

I am working on Neptune instance of size ml.t3.2xlarge.

 

Regards,

Neelima

--
You received this message because you are subscribed to the Google Groups "Gremlin-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gremlin-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gremlin-users/53363131-925a-4f84-9951-44db891cf9c2n%40googlegroups.com.

Kelvin Lawrence

unread,
May 31, 2022, 11:19:50 AM5/31/22
to Gremlin-users
What is the size of the Neptune instance you are connected to? I believe the ml.t3.2xlarge you mention is the SageMaker instance type. Larger Neptune instances have more memory, which may be needed for more complex queries.

As this discussion is specific to Amazon Neptune, you may want to open an AWS support case if you are able. or move the conversation to https://repost.aws/ as an alternative.

Cheers,
Kelvin


Reply all
Reply to author
Forward
0 new messages