Skip to content

Neptune query returns intermittent InternalFailureException error

0

An open cypher Neptun query returned InternalFailureException error, three times in a row five days ago, it succeeded today:

{"code":"InternalFailureException","requestId":"ccd06b9b-4122-98a2-2bd1-eacf388fd04e","detailedMessage":"Operation terminated (internal error)","message":"Operation terminated (internal error)"}

What is causing the issue?

  • Hi @Evgenii - Unfortunately, there's not enough here to tell us what the root cause of this issue would be. If you are able to open a support case, please do so with the ARN of your cluster. If unable to open a support case, reach out to us via email at neptune-repost at amazon.com and we'll try to help you there.

asked a month ago201 views

2 Answers
0

Short answer: InternalFailureException / "Operation terminated (internal error)" is Neptune's catch-all for a server-side failure it can't classify. It doesn't name a cause, so nobody can tell you from the message alone.

But the shape of what you saw narrows it considerably.

What the pattern tells you

Three failures in a row, then success five days later with (presumably) an unchanged query. That rules out anything deterministic — syntax, unsupported operations, query structure. Whatever went wrong was tied to the state of the cluster or the data at that moment.

Two things worth noting about the error class itself. Neptune's openCypher exception table lists internal error separately from the errors that do have named causes — out of memory, deadline exceeded, cancelled by user. If you had exhausted memory you'd normally get "Operation terminated (out of memory)" with a documented remedy of adding filters. You got the unclassified one instead, which points away from ordinary resource exhaustion and toward something the engine didn't expect.

Second, note it's marked retriable — consistent with your experience.

Where to actually look

CloudWatch metrics at the failure timestamps. Pull FreeableMemory, CPUUtilization, MainRequestQueuePendingRequestsCount, NumTxRolledBack, and BufferCacheHitRatio for that window. If freeable memory cratered or the request queue backed up, you have a resource story even if the error didn't say so. If everything looks flat, that's also informative — it points at an engine fault rather than load.

Whether a failover or maintenance event occurred. Check the cluster's event history and the Health Dashboard for that day. A writer failover mid-query surfaces as an unclassified internal error.

Your engine version. This matters. Engine 1.4.5.1 (2025-06-30) fixed an issue where an internal error was returned on some openCypher queries when running collect(distinct()) on a list, and separately fixed concurrent FTS queries terminating each other when using OpenSearch Serverless.

If you're below 1.4.5.1, check whether your query uses collect(distinct(...)) over a list — that's a known, named cause of exactly this error. And if the query involves full-text search against OpenSearch Serverless, the concurrency bug is a strong candidate for something intermittent that resolves on retry.

Audit and slow query logs. If neptune_enable_audit_log was on, the query is recorded. Slow query logging will tell you whether these runs were behaving differently from today's successful one.

Practically, in the meantime

Since the error is documented as retriable, implement exponential backoff around it if you haven't. Three consecutive failures suggests whatever it was persisted for some window, so back off on the order of tens of seconds rather than milliseconds.

And if you're below 1.4.5.1, upgrading is worth doing on its own merits — you may simply be running into a bug that's already fixed.

EXPERT

answered a month ago

EXPERT

reviewed a month ago

-1

The InternalFailureException error you're experiencing indicates that the request processing failed unexpectedly within Neptune. This is a 500-level error that suggests an internal service issue rather than a problem with your query syntax or parameters.

Based on the error characteristics, this exception is classified as not safe to retry in most cases, as it represents an unexpected failure in request processing. However, the fact that your query succeeded after several days suggests this was likely a transient issue within the Neptune service itself.

Since the error resolved on its own and your query is now working, this points to a temporary internal service condition that has since been remediated. The intermittent nature - failing three times in a row and then succeeding days later without any changes on your end - is consistent with an internal service issue rather than a problem with your query or configuration.

If you encounter this error again, you can add correspondence through the AWS Support Center to report the issue, especially if it persists or impacts your operations. Including the request ID from the error response will help AWS investigate the specific failure. You may also want to review your AWS Support plan options if you need faster response times for critical issues.
Sources
Graph Engine Error Messages and Codes - Amazon Neptune
InternalFailureException - botocore 1.42.50 documentation

answered a month ago

  • Please stop replying with this ai slop thank you i want an actual human response.

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.