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.


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.

Andrew, thanks alot for the clarification.

Almost two years of intense java/neo4j projects and still learning the basics - shame on me :)