How to kill long running query

How can we kill long running query without restart.I tried using command call dbms.killQuery('query-16172'),but its not working.


Query management ( is a feature in Enterprise Edition only. Just in case you're on Community Edition.

Similar problem here. I'm in the Enterprise version and often get long running queries that don't seem to be able to killed.

That may depend on what the consequences are of that query being executed.

For example, if it starts resulting in high garbage collection operations, those pause processing, so a bad query may prevent you from being able to communicate with the server.

We do have improvements coming in 4.0 for setting limits on the amount of memory a query is allowed to use which will auto-terminate it if it crosses that threshold. That may help out for scenarios like these.

if you're using Neo4j Browser then open Neo4j in another browser window and run this query there "CALL dbms.listQueries()" which will give you list of running queries with their respective IDs and you can kill each of them using this "call dbms.killQuery('query-id')" from here.

1 Like