# Updates cause Lock wait timeout exceeded

**URL:** <https://forums.percona.com/t/updates-cause-lock-wait-timeout-exceeded/5083>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [September 14, 2016, 7:41am UTC](https://forums.percona.com/t/updates-cause-lock-wait-timeout-exceeded/5083 "2016-09-14T07:41:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicolas.baer](https://avatars.discourse-cdn.com/v4/letter/n/a9a28c/32.png) [@nicolas.baer](https://forums.percona.com/u/nicolas.baer)\
**Post date:** [September 14, 2016, 7:41am UTC](https://forums.percona.com/t/updates-cause-lock-wait-timeout-exceeded/5083/1 "2016-09-14T07:41:08Z")

</div>

Hello  
We setup a XtraDB cluster with 3 nodes in failover mode. We are using JDBC for the failover and experience a lock issue that shows the following error message:  
Caused by: java.sql.SQLException: Lock wait timeout exceeded; try restarting transaction

It looks like the jdbc driver will failover to the second node even thought the first node is still available. We investigated flow control, but could not find an issue there. Any recommendation on how we can further debug our issue?

We use the following versions:  
MySQL 5.1.73  
Percona XtraDB 5.6.21  
Java MySQL Connector 5.1.18

JDBC Configuration: jdbc:mysql://host1,host2,host3/somedb?useConfigs=maxPerformance&characterEncoding=utf8&connectTimeout=15&autoReconnect=true&autoReconnectForPools=true&failOverReadOnly=false&explainSlowQueries=true

---

<div class="post-metadata">

**Author:** ![nicolas.baer](https://avatars.discourse-cdn.com/v4/letter/n/a9a28c/32.png) [@nicolas.baer](https://forums.percona.com/u/nicolas.baer)\
**Post date:** [September 16, 2016, 4:45am UTC](https://forums.percona.com/t/updates-cause-lock-wait-timeout-exceeded/5083/2 "2016-09-16T04:45:45Z")

</div>

We will change to a setup with HAProxy and see if that resolves the deadlock issues.
