Search code examples
amazon-web-servicesgremlinamazon-neptune

AWS Neptune Timeout simple query


I have a fairly straightforward neptune query, gets the next 5 nodes

this.g.V(id).repeat(__.inE().outV()).emit().times(depth).tree().by(__.valueMap(true));

My graph is currently small, around 3500 nodes. The query generally takes < 1 second to run. In my logs i see successful calls taking < 1 second, then 5 minutes later, it times out after 30 seconds. Then a call 2 minutes later works.

I'm not sure at this point what to check; I'm following the guidelines at https://docs.aws.amazon.com/neptune/latest/userguide/lambda-functions-examples.html where I create the connection outside of the lambda handler for reuse. I'm about to try recreating the connection on every lambda call, but wanted to know if there was anything else that could possibly cause this timeout. I checked cloudwatch and my GremlinRequestsPerSec was only 2.5 max for the past 12 hours.


Solution

  • a separate concurrent modification exception/retry was causing the normal query to timeout.