Gil Stal
Gil Stal

Reputation: 3458

How to kill a currently long running query in Neo4j

How can I kill a currently long-running query in Neo4j (without restarting the server)?

I know we can globally set a timeout for queries, but sometimes I want to execute heavy queries/creates/updates on the server that could take a while...

Thanks.

Upvotes: 36

Views: 11953

Answers (5)

Jerome_B
Jerome_B

Reputation: 1097

Available in version >3.1 Enterprise with

CALL dbms.listQueries()
CALL dbms.killQuery(queryId) 

Admins may "kill'em all"

There is also

 :queries

Upvotes: 12

Albert S
Albert S

Reputation: 2602

I found that in the shell pressing CTRL-C terminates the query (running V3.0.3)

Upvotes: 0

Anuj Gupta
Anuj Gupta

Reputation: 157

I think there is no way to abort queries in Neo4j.

There is a way to kill long running queries automatically with the Guard stuff (you can pick either max number of operations or a timeout). There were some instructions sent out (couldn't find it immediately and I need to run).

Upvotes: 0

Mike D
Mike D

Reputation: 220

The 2.2 release has some functionality around this area, but still no monitoring tool that you could see, for example, the queries ran by other clients, you can only kill your own long running queries, executed through the web ui or the shell.

Neo4J 2.2 Release Notes

Upvotes: 1

Laszlo Varga
Laszlo Varga

Reputation: 87

Currently there is no way to abort queries in Neo4j. At least I haven't found anything when I needed and I searched the docs quite a lot of times.

Upvotes: 1

Related Questions