0

I'm using Gremlin on Lambda (Node 12.x) to traverse Neptune. Occasionally on a cold start, Neptune will return a 500 error. From CloudWatch:

{
    "errorType": "ResponseError",
    "errorMessage": "Server error: {\"requestId\":\"2a15ac95-ca36-406b-b210-5f7f98b6dd1d\",\"detailedMessage\":\"An unexpected error has occurred in Neptune.\",\"code\":\"InternalFailureException\"} (500)",
    "name": "ResponseError",
    "statusCode": 500,
    "statusMessage": "{\"requestId\":\"2a15ac95-ca36-406b-b210-5f7f98b6dd1d\",\"detailedMessage\":\"An unexpected error has occurred in Neptune.\",\"code\":\"InternalFailureException\"}",
    "statusAttributes": {},
    "stack": [
        "ResponseError: Server error: {\"requestId\":\"2a15ac95-ca36-406b-b210-5f7f98b6dd1d\",\"detailedMessage\":\"An unexpected error has occurred in Neptune.\",\"code\":\"InternalFailureException\"} (500)",
        "    at Connection._handleMessage (/var/task/src/services/getFeed/index.js:8774:9)",
        "    at WebSocket.<anonymous> (/var/task/src/services/getFeed/index.js:8634:43)",
        "    at WebSocket.emit (events.js:210:5)",
        "    at WebSocket.EventEmitter.emit (domain.js:476:20)",
        "    at Receiver._receiver.onmessage (/var/task/src/services/getFeed/index.js:21851:47)",
        "    at Receiver.dataMessage (/var/task/src/services/getFeed/index.js:21069:14)",
        "    at Receiver.getData (/var/task/src/services/getFeed/index.js:21019:12)",
        "    at Receiver.startLoop (/var/task/src/services/getFeed/index.js:20854:16)",
        "    at Receiver.add (/var/task/src/services/getFeed/index.js:20828:10)",
        "    at Socket.<anonymous> (/var/task/src/services/getFeed/index.js:21848:22)"
    ]
}

Logging is enabled in Neptune but I don't see anything being captured in CloudWatch. Subsequent requests to Neptune run fine. How can I further debug this?

Fook
  • 5,320
  • 7
  • 35
  • 57
  • When you said that logging is enabled in Neptune, did you mean Audit Logging (CWLogs export) ? If yes, then do you see the failing request appear in Audit Logs? – The-Big-K Dec 24 '19 at 06:11
  • Are you creating a connection per lambda invocation or are you creating a connection once and re-using it for future invocations? – The-Big-K Dec 24 '19 at 06:11
  • @big-K I have Audit logging enabled in the Neptune console, however it doesn't seem to be creating that log in CloudWatch. There is no log group for Neptune in CloudWatch. Maybe this is a role issue? The error I see is what gets logged by Lambda, not directly from Neptune. Each invocation of Lambda will set up the Neptune connection, run the traversal, then immediately tear down the connection. – Fook Dec 24 '19 at 14:00
  • @Fook Can you please create a post in the AWS Neptune Forum for Neptune and/or create an AWS Support case on this? https://forums.aws.amazon.com/forum.jspa?forumID=253&start=0 – Brad Bebee Dec 24 '19 at 18:40
  • @BradBebee I have added a post in the forum. https://forums.aws.amazon.com/thread.jspa?threadID=314653 – Fook Dec 24 '19 at 18:55

0 Answers0