Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
06-07-2021 06:15 AM
Hi, we are running neo4j community 4.2 and native python driver.
Under heavy parallel load we encounter DeadlockDetected exception (can't wait on resource RWLock) relationships creation.
Is there a way to increase wait timeout for write lock acquisition?
It is rather expensive for us to retry entire transaction caouse of this.
Thanks in advance, Dmitry.
Solved! Go to Solution.
06-07-2021 11:53 AM
Hello,
Deadlocks aren't just cases of lock contention, they are not something that can be waited out, it is a state that can only be resolved by termination of one transaction or another.
By using transaction functions automatic retry will be performed by the driver after a transaction is terminated to resolve the deadlock.
You may also want to consider tuning your queries to try to hold fewer locks or less transactional state, since queries with larger amounts of changed state will be holding more locks, and there is more opportunity for lock contention (and deadlock) to occur between such queries.
06-07-2021 11:53 AM
Hello,
Deadlocks aren't just cases of lock contention, they are not something that can be waited out, it is a state that can only be resolved by termination of one transaction or another.
By using transaction functions automatic retry will be performed by the driver after a transaction is terminated to resolve the deadlock.
You may also want to consider tuning your queries to try to hold fewer locks or less transactional state, since queries with larger amounts of changed state will be holding more locks, and there is more opportunity for lock contention (and deadlock) to occur between such queries.
06-08-2021 02:56 AM
Andrew, thanks alot for the clarification.
Almost two years of intense java/neo4j projects and still learning the basics - shame on me 🙂
All the sessions of the conference are now available online