# Random deadlocks in read-only tables in Percona XtraDB Cluster

**URL:** <https://forums.percona.com/t/random-deadlocks-in-read-only-tables-in-percona-xtradb-cluster/5569>\
**Category:** Percona XtraDB Cluster 5.x\
**Created:** [April 24, 2017, 11:11am UTC](https://forums.percona.com/t/random-deadlocks-in-read-only-tables-in-percona-xtradb-cluster/5569 "2017-04-24T11:11:23Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ofrias](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/ofrias/32/15159_2.png) [@ofrias](https://forums.percona.com/u/ofrias)\
**Post date:** [April 24, 2017, 11:11am UTC](https://forums.percona.com/t/random-deadlocks-in-read-only-tables-in-percona-xtradb-cluster/5569/1 "2017-04-24T11:11:23Z")

</div>

Hi.

We are seeing random deadlock errors when reading data from tables which are not being modified at the time of the select (they are updated only in nightly maintenance tasks). How is this possible? I thought deadlocks could only happen when there was some modification, but not when only reading, even if there is concurrent reading as is our case.  
The exact error message is “WSREP detected deadlock/conflict and aborted the transaction. Try restarting the transaction”.  
We are using a PXC with 2 nodes and:

wsrep\_retry\_autocommit=5 wsrep\_drupal\_282555\_workaround=ON Percona Server version: 5.7.17-11-57-log - Percona XtraDB Cluster (GPL), Release rel11, Revision e2a7fdd, WSREP version 27.20, wsrep\_27.20  
How can we fix this?

---

<div class="post-metadata">

**Author:** ![jrivera](https://sea1.discourse-cdn.com/flex019/user_avatar/forums.percona.com/jrivera/32/13_2.png) [@jrivera](https://forums.percona.com/u/jrivera)\
**Post date:** [May 9, 2017, 2:26am UTC](https://forums.percona.com/t/random-deadlocks-in-read-only-tables-in-percona-xtradb-cluster/5569/2 "2017-05-09T02:26:44Z")

</div>

I would suggest to set wsrep\_debug=ON and then share the error log here as soon as you can reproduce the issue. sharing your my.cnf will help as well.
