cancel
Showing results for 
Search instead for 
Did you mean: 

Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.

Neo.TransientError.Transaction.LockAcquisitionTimeout:

Hello Team,

I am getting below error while running the below cypher query:
USING PERIODIC COMMIT 1000
LOAD CSV WITH HEADERS FROM 'file:///granite2csv_path.csv' as row
MATCH (n:SPLITTER1_IN_PORT {SPLITTER1_NAME: row.PATH_ASIDE_EQUIPMENT })
MATCH (m:SPLITTER1_OUT_PORT {SP1_OUT_PORT_NAME: row.PATH_ASIDE_PORT})
MERGE (n)-[r:SP1_INPORT_2_SP1_OUTPORT]->(m)
return r

Error:

Neo.TransientError.Transaction.LockAcquisitionTimeout: The transaction has been terminated. Retry your operation in a new transaction, and you should see a successful result. Unable to acquire lock within configured timeout. Unable to acquire lock for resource: NODE with id: 245426 within 10000 millis.

Please suggest how to solve this and why this error comes?

4 REPLIES 4

From the error message it sounds like you might have another query running which has a lock on a node that you're trying to write to. Are you running multiple queries at the same time?

Hello Mark,

Thanks for a very quick reply.
You mean to say that same query is running twice?

Regards
Akshat

Hi Akshat,

We don't know if it's another execution of the same query or a separate query, but we do know there is a transaction open at the time of that execution that held the lock on the node with id 245426 for at least 10 seconds, preventing the query you ran from acquiring the lock and triggering the lock acquisition timeout.

You may want to use dbms.listQueries() and/or dbms.listTransactions() if you see the timeout again to figure out what else is running that might be holding onto the locks.

how to measure the lock acquisition timeout interval.before set this config..

I see queries are stuck.. How to release the lock without using kill query Or restart the server. Is there any query to unlock ..

Problem is when one gets locked, others keep piling up and do not progress. These are effects of certain nodes not getting updated. Also could not load any new jobs after clean up. One node or two nodes blocking... what is the solution for this issue?

Nodes 2022
Nodes
NODES 2022, Neo4j Online Education Summit

All the sessions of the conference are now available online