List transactions with no current query


(Amad Fida) #1

When trying to see what transactions are running, we see some blank rows from time to time, for example

neo4j> CALL dbms.listTransactions() YIELD transactionId, currentQuery, elapsedTimeMillis,status;
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| transactionId       | currentQuery                                                                                 | elapsedTimeMillis | status    |
+----------------------------------------------------------------------------------------------------------------------------------------------------+
| "transaction-27535" | ""                                                                                           | 60002             | "Running" |

What is that mean, the transaction is committing, and there is no query currently running?


(Andrew Bowman) #2

It's possible to begin or create new transactions but not yet run anything. Likewise, a transaction may have finished executing a query, but may not yet have been committed or rolled back.


(Amad Fida) #3

Thanks and there is no way to manually kill a transaction, correct?


(Andrew Bowman) #4

There's a proc to kill a query based on the query id, but that won't help in this case. You may want to look at neo4j.conf properties you can set to auto-kill transactions after a given amount of time.

Take a look at
dbms.transaction.timeout
and
dbms.lock.acquisition.timeout
If you use these, you'll probably want to set the same timeout value to both of them.


(Amad Fida) #5

Yeah i am familiar with these settings, not a big fan of them as they are very much global. I know i can set the setting dynamically and then go back to default. But previously it seemed that the timeout setting when set doesn't apply to in-flight transaction. and I was trying to avoid a restart


(Andrew Bowman) #6

Understood. It's definitely a worthwhile feature request, we've passed this along to our Cypher team.