Getting deadlocks with MySQL

Hi there,

I just recently migrated my Kanboard instance from Sqlite to MySQL using the script from https://github.com/oliviermaridat/kanboard-sqlite2mysql. The reason for this migration were problems I thought to be connected with limitations of Sqlite: Loading the board or creating new tasks took a lot of time (~4s) and dragging cards from one column / swimmlane to the other also took long and sometimes stalled (eternal spin-wheel).

However, after the migration things are not perfect. The “eternal spin-wheel” is gone, but loading times are even higher, now!

Looking at the logs I see a lot of these messages:

its-nins-kanboard.its.unibas.ch [2020-07-14 08:56:47.205094] [php7:notice] [pid 21742] [client 131.152.102.33] [critical] Backlog: SQL Error: SQLSTATE[40001]: Serialization failure: 1213 Deadlock found when trying to get lock; try restarting transaction

This might be connected with the poor performance but doesn’t have to. I read a lot of “bad performance” posts here…

So my question is:

  • Does anyone know these deadlock error messages and know where they come from and how to get rid of them?
  • Any other suggestions on performance tuning?

My environment:

Application version: 1.2.15
PHP version: 7.2.24-0ubuntu0.18.04.6
PHP SAPI: apache2handler
HTTP Client: cURL
OS version: Linux 4.15.0-109-generic
Database driver: mysql
Database version: 10.1.44-MariaDB-0ubuntu0.18.04.1
Browser: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:77.0) Gecko/20100101 Firefox/77.0

My data:

  • Just one board with 200-250 open tasks
  • Backlog plugin

Any help appreciated!

Regards,
Philipp