Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-30-2018 09:49 AM
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?
08-30-2018 09:55 AM
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.
08-30-2018 09:58 AM
Thanks and there is no way to manually kill a transaction, correct?
08-30-2018 10:12 AM
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.
08-30-2018 10:17 AM
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
08-30-2018 10:33 AM
Understood. It's definitely a worthwhile feature request, we've passed this along to our Cypher team.
01-17-2019 11:56 AM
Is there a way to log queries that ran as part of tx or somehow correlated this transaction-id to queries after they have run? Like in my case above, I would like to know what query was run during this transaction that is being committed?
01-21-2019 02:40 AM
If using the latest drivers, there should be richer capability to both add metadata to transactions, and also to set timeouts per transaction.
If using the Java driver, for example, in the API for Session you can see that most of the methods for executing transactions can take a TransactionConfig parameter, and if you look at the examples for usage you can see that you can set the timeout that will be used, as well as add in metadata that will be logged in the servers query.log file (provided query logging is enabled) as well as listed when running dbms.listTransactions()
.
See our release article on the Neo4j 1.7 drivers for more info on the added capabilities.
All the sessions of the conference are now available online