- Newest
- Most votes
- Most comments
It is likely that this issue is being caused by a Timeout Exception. Amazon Neptune Database has a default timeout of 2 mins per query. For a moderately large dataset, a g.V().drop() query will take substantial time to execute. At present, all mutation queries in Neptune are executed single-threadeded. So only one execution thread is able to do this work.
Another method to quickly drop an entire cluster is to use the Fast Reset API [1]. This is also exposed via the NeptuneData APIs in boto3 [2]:
response = client.execute_fast_reset(
action='initiateDatabaseReset'|'performDatabaseReset',
token='string'
)
This will allow you to quickly drop an entire cluster and reset it back to it's default state without needing to do this via a query.
[1] https://docs.aws.amazon.com/neptune/latest/userguide/manage-console-fast-reset.html
answered 2 years ago
The issue you're experiencing with the Neptune loader job, particularly the InternalFailureException during the data deletion step, could be due to several factors:
-
Cluster Load: The production cluster might be under heavy load, causing the operation to time out or fail. This could explain why you're seeing the issue in production but not in development environments.
-
Data Volume: If your production cluster contains a significantly larger volume of data compared to your development clusters, the deletion operation might be more resource-intensive and prone to failure.
-
Concurrent Operations: There might be other operations running concurrently that are interfering with the deletion process.
-
Timeout Settings: The operation might be timing out before it can complete. You may need to adjust the timeout settings for your Neptune client.
To address these issues and improve your process:
-
Consider using the Neptune Bulk Delete API instead of a Gremlin query for large-scale deletions. This is often more efficient for clearing entire datasets.
-
Implement a retry mechanism with exponential backoff for the deletion operation.
-
Schedule the loader job during off-peak hours to minimize the impact of cluster load.
-
For schema changes, instead of deleting and reloading all data, consider using Neptune's upsert capabilities to update existing data where possible.
-
Enable detailed logging for Neptune by modifying the DB cluster parameter group. Set the neptune_enable_audit_log parameter to 1 to enable audit logging, which can provide more insights into query execution and errors.
-
Use the Neptune workbench to run and analyze queries, which can provide more detailed error messages and query profiles.
-
Consider using the Neptune Data API's ExecuteGremlinProfileQuery operation to get more detailed information about query execution and potential bottlenecks.
-
If the issue persists, you may want to contact AWS support for a more in-depth investigation of your specific cluster configuration and workload.
Remember to thoroughly test any changes in a staging environment that closely mimics your production setup before implementing them in production.
Sources
Example: Loading Data into a Neptune DB Instance - Amazon Neptune
CancelLoaderJob - Neptune Data API
ExecuteGremlinProfileQuery - Neptune Data API
GetGremlinQueryStatus - Neptune Data API
answered 2 years ago
Need detailed answer from Support Team
Hello,
I would recommend opening up a support case to investigate the InternalFailureException happening on the delete step.
AWS Support would need to review the affected cluster, be sure to include the full error message and time of issue so the team can check further.
Relevant content
asked 4 years ago
- AWS OFFICIALUpdated 2 years ago

Thanks Taylor, for explaining it briefly, I have tried using Fast Reset API to delete and cluster, following are my observations: . Data got deleted from the cluster. . After deletion I have loaderjob functionality in the code which is throwing me this error: Could not connect to the endpoint URL(i.e connection to the Neptune endpoint is lost). Could you please let me know what might be the issue with my trigger_neptune_loader_job()
The Fast Reset API will reset the cluster (which will restart the instances). They should come up within a few seconds, but it may require you to poll them for availability before you start your loader job. You could potentially use the https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/neptunedata/client/get_engine_status.html API as a means to poll for when the instance is available again.