cancel
Showing results for 
Search instead for 
Did you mean: 

Join the community at Nodes 2022, our free virtual event on November 16 - 17.

Neo4j tx with status 'Terminated...' doesn't go a way / continues to incur page hits/faults

ppatino
Node

This morning, I accidentally ran a query (on Enterprise 4.4) where I intending to use the count store, but wrote it incorrectly (I know how to write this using the store, not asking about how to do that):

MATCH p=()-[r:SomeRelType]->() RETURN count(p)

I realized that this was wrong after the query didn't complete immediately. So I found the query via call dbms.listQueries, killed it, and nothing happened. I then found the corresponding transaction, and attempted to kill it. But after doing so, after ~1hr I checked in, and this query & transaction still shows up. Calling dbms.listTransactions shows the tx with a status of 'Terminated...' (sorry - don't have the exact text, I lost it), but continually calling dbms.listTransactions, I can see the tx / query are still incurring a large number of page hits & faults.

I am looking to understand what I am fundamentally missing - is it impossible to guarantee that a given query & transaction will be killed? Re-skimming the docs, I'm not seeing anything about guarantees of termination or any caveats / anything telling me what to expect in this scenario. I had to restart this (production) Neo4j instance in order for this query to go away. The number of rels in question is in the 100s of millions / it was completely unclear when this would finish / exactly how this was impacting other queries. Could there have been
any other way for me to stop this transaction / query? I think one option is implementing transaction timeouts via neo4j.conf, but we do have some queries that take a long time to run but do eventually finish, that prevent me from coming up with a universally-fitting threshold of when to consider transactions timed out.

Thanks in advance!

0 REPLIES 0