In Neo4j we currently have the configuration property referred to as execution guard:
dbms.transaction.timeout=30s
that can be set automatically to kill transactions that take more than “x” seconds (x is equal to what is assigned to dbms.transaction...