Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
03-05-2019 08:43 PM
How can we kill long running query without restart.I tried using command call dbms.killQuery('query-16172'),but its not working.
Regards,
Tanmoy
03-05-2019 11:50 PM
Query management (https://neo4j.com/docs/operations-manual/current/monitoring/query-management/) is a feature in Enterprise Edition only. Just in case you're on Community Edition.
12-04-2019 09:31 AM
Similar problem here. I'm in the Enterprise version and often get long running queries that don't seem to be able to killed.
12-04-2019 04:54 PM
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.
04-28-2020 03:11 AM
@andrew.bowman limiting memory ... that is one way to kill query. But this will impact if i am caching graph for further processing.
Can we able to terminate/manage/see long running queries (based on execution time not by memory) in community version.
04-28-2020 08:25 AM
Not currently, at this point in time that's still enterprise edition only.
But it is possible that may change in the future, especially with the new 4.0 enterprise features, so there's much more out there now to differentiate the editions. I'd love to see query/transaction listing and killing available in community edition, but if and when is up in the air.
09-18-2020 02:36 AM
Hi Andrew,
Was this memory limit with auto-terminate, implemented in 4.0 as you mentioned? I am looking for something like that for my apoc-based queries looking for multiple hops between two nodes. They tend to blow up in size (especially in breadth-first-search) and sink the server so that I can't even connect on a different browser window to kill the query.
09-18-2020 06:28 PM
We have some configuration you can use in 4.1 for this:
12-04-2019 10:18 PM
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.
04-28-2020 03:07 AM
great, this is what i was looking for to trap long running query
03-16-2022 07:03 PM
By 2022/3, it is suggested to use show transactions
and then TERMINATE TRANSACTION[S] transaction_id[, ...]
Doc: https://neo4j.com/docs/cypher-manual/4.4/clauses/transaction-clauses/#query-terminate-transactions
All the sessions of the conference are now available online