We have a strange problem with writing into Neo4J database. Reading works fine at all times.
After certain time of operation, our database will get into the state, where writes are not possible anymore. Any query "MATCH ... SET ... RETURN" hangs indifinetly and after a long time it ends with:
The transaction has been terminated. Retry your operation in a new transaction, and you should see a successful result. The transaction has been terminated, so no more locks can be acquired. This can occur because the transaction ran longer than the configured transaction timeout, or because a human operator manually terminated the transaction, or because the database is shutting down. ForsetiClient[transactionId=38053, clientId=2294]
It looks like a lock problem, but when inspecting current running transactions, I see this:
micauser@neo4j> call dbms.listTransactions() yield transactionId, startTime, currentQueryId, currentQuery, status;
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| transactionId | startTime | currentQueryId | currentQuery | status |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| "neo4j-transaction-5910" | "2022-12-12T19:11:41.448Z" | "" | "" | "Closing" |
| "neo4j-transaction-5913" | "2022-12-12T19:13:13.952Z" | "query-18087" | "call dbms.listTransactions() yield transactionId, startTime, currentQueryId, currentQuery, status;" | "Running" |
+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
`So the problematic query is in "Closing" state. Any ideas what might be wrong and how to debug it?