# Weird TokuDB deadlocks

**URL:** https://forums.percona.com/t/weird-tokudb-deadlocks/5100
**Category:** Other MySQL® Questions
**Created:** [September 21, 2016, 11:40am UTC](https://forums.percona.com/t/weird-tokudb-deadlocks/5100 "2016-09-21T11:40:40Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![azilber](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@azilber](https://forums.percona.com/u/azilber)
#### Post date: [September 21, 2016, 11:40am UTC](https://forums.percona.com/t/weird-tokudb-deadlocks/5100/1 "2016-09-21T11:40:40Z")

</div>

Hi all,

We are running an old version of TokuDB (7.5.1) based on MariaDB 5.5 that we haven’t upgraded yet. We have a decent amount of data in there on a server with SSD raid-10 drives, and 260GB of ram (170GB used by TokuDB). The binary-logs are on separate raid-10 15k drives. Things have been running quite well for a long time, but lately we’ve been having weird stalls on simple queries that happen once a day at a random time. The stalls happen during non-peak times, and simple queries, that access a single key get deadlocked and stalled. It stalls for around 2-3 minutes, causing a bit of havoc, but then recovers. sar shows nothing out of the ordinary in terms of swap, i/o, cpu, network or ram usage. io utilization is negligible. I’m thinking that maybe the indexes need to be rebuilt, as the db is a number of years old, but beyond that, we’re stumped.

---

<div class="post-metadata">

### Author: ![azilber](https://avatars.discourse-cdn.com/v4/letter/a/a5b964/32.png) [@azilber](https://forums.percona.com/u/azilber)
#### Post date: [October 3, 2016, 7:22pm UTC](https://forums.percona.com/t/weird-tokudb-deadlocks/5100/2 "2016-10-03T19:22:01Z")

</div>

I would like to add that we’re also seeing inserts blocking updates, and updates blocking inserts, which is very strange. We’ve also discovered that updates of the type ‘`x`=`x`+1’ seem to be the main culprit…
