openCypher query timeout hint
Query timeout behavior can be configured on a per-query basis by query-level query hint
QUERY:TIMEOUTMILLISECONDS. It must be used with the USING clause. The query hint accepts
non-negative long as a value.
Query timeout behavior will consider the minimum of cluster-level timeout and query-level timeout. Please see below examples to understand query timeout behavior. For more information on cluster-level query timeout, see neptune_query_timeout.
# Suppose `neptune_query_timeout` is 10000 ms and query-level timeout is set to 100 ms # It will consider 100 ms as the final timeout curl https://your-neptune-endpoint:port/openCypher \ -d "query=USING QUERY:TIMEOUTMILLISECONDS 100 MATCH(n) RETURN n LIMIT 1" # Suppose `neptune_query_timeout` is 100 ms and query-level timeout is set to 10000 ms # It will still consider 100 ms as the final timeout curl https://your-neptune-endpoint:port/openCypher \ -d "query=USING QUERY:TIMEOUTMILLISECONDS 10000 MATCH(n) RETURN n LIMIT 1"
If a query exceeds the timeout, Neptune terminates it and returns a time-out error. Whether to retry a timed-out query depends on the nature of the failure and your workload. For guidance, see Exception Handling and Retries.