Lot of database deadlocks
-
Hi,
I have Kopano 8,3,0,1042 installed on Debian 8.
The database is on a MariaDB Galera cluster composed by 3 nodes and Kopano connects to it through an HAProxy load balancer.
The problem is that users using the WebApp are receiving a lot of"You have insufficient privileges to delete items in this folder."
errors, expecially when they try to move or delete a lot of elements in the same folder.
I managed in reproducing the problem, and every time I receive it I see the following error in MySQL logs:
[ERROR] mysqld: Deadlock found when trying to get lock; try restarting transaction
I debugged Ajax connections when I try to delete many elements from one folder, and I receive the error because the Ajax call exits with the following error:
{zarafa: {,…}} zarafa: {,…} createmailitemmodule: {createmailitemmodule66: {success: []}, createmailitemmodule67: {success: []},…} createmailitemmodule66: {success: []} createmailitemmodule67: {success: []} createmailitemmodule68: {error: {type: 1,…}} error: {type: 1,…} info: {hresult: -2147221226, hresult_name: "MAPI_E_DISK_ERROR", file: "class.operations.php:2588",…} display_message: "You have insufficient privileges to delete items in this folder." file: "class.operations.php:2588" hresult: -2147221226 hresult_name: "MAPI_E_DISK_ERROR" type: 1 createmailitemmodule69: {success: []} createmailitemmodule70: {error: {type: 1,…}} error: {type: 1,…} info: {hresult: -2147221226, hresult_name: "MAPI_E_DISK_ERROR", file: "class.hierarchynotifier.php:72",…} display_message: "You have insufficient privileges to delete items in this folder." file: "class.hierarchynotifier.php:72" hresult: -2147221226 hresult_name: "MAPI_E_DISK_ERROR" type: 1 createmailitemmodule71: {success: []} createmailitemmodule72: {success: []} createmailitemmodule73: {success: []} hierarchynotifier: {hierarchynotifier1: {folders: {item: [{,…}]}}, hierarchynotifier2: {folders: {item: [{,…}]}},…} maillistnotifier: {maillistnotifier1: {delete: {item: [{,…}]}}, maillistnotifier2: {delete: {item: [{,…}]}},…}
My users are very disappointed, could you help me please?
-
Hi @decibel83 ,
have you tuned your database according to our recommendations? https://kb.kopano.io/display/WIKI/Tuning gives some starting pointers and if you have a subscription a more comprehensive guide can be requested from our support.
How many users are connecting to the system?
If tuning does not help I’d recommend reducing complexity and seeing if the error goes away. Like remove haproxy and go directly towards the database, if the error does not go away use MySQL/MariaDB naively.
I’ve also already written down some thoughts on Galera in https://forum.kopano.io/topic/370/kopano-core-high-availebility/2, I would not really recommend for this use case.
And (almost) last, but not least
@decibel83 said in Lot of database deadlocks:
8,3,0,1042 installed on Debian 8
You are running quite an old version, updating probably would not hurt.
Depending on the size of you installation it probably would not hurt either to reach out to our sales team to get an offer for one of our support engineers to take a direct look at you system.