8.3. Query management

This section describes the tools that are available for controlling the execution of queries in Neo4j.

There may be occasions when there is a need to inspect queries, either from a security or a performance point of view. Neo4j provides various means for inspecting and managing queries.

The query log is available for continuous monitoring and for troubleshooting. The transaction timeout feature is a safety measure by which an operator can define a maximum running time for queries. The query management procedures allows for inspecting, and possibly killing, queries while they run in the database.

The section describes the following:

8.3.1. Transaction timeout

The execution guard is a feature that terminates transactions whose execution time has exceeded the configured timeout.

To enable the execution guard, set dbms.transaction.timeout to some positive time interval value denoting the default transaction timeout.

Example 8.4. Configure execution guard

Set the timeout to ten seconds.


Setting dbms.transaction.timeout to 0 — which is the default value — disables the execution guard.

This feature will have no effect on transactions executed with custom timeouts (via the Java API), as a custom timeout will override the value set for dbms.transaction.timeout.