Mariadb – Internal MariaDB error code: 1927 (‘Connection was killed’)

galeramariadbmariadb-10.1multi-master

Edit: filed a bug report at https://jira.mariadb.org/browse/MDEV-14493

Mariadb nodes freeze occasionally with the following error in the logs, any clues?

(drupal app, db freezes on clearing application cache)

[Warning] WSREP: Failed to apply app buffer: seqno: 903792, status: 1
Nov 23 21:42:55 websrv4 mysqld[1725]: #011 at 
galera/src/trx_handle.cpp:apply():351
Nov 23 21:42:55 websrv4 mysqld[1725]: Retrying 2th time
Nov 23 21:42:55 websrv4 mysqld[1725]: 2017-11-23 21:42:55 140081879742208 
[Warning] WSREP: BF applier failed to open_and_lock_tables: 1927, fatal: 0 
wsrep = (exec_mode: 1 conflict_state: 5 seqno: 903792)
Nov 23 21:42:55 websrv4 mysqld[1725]: 2017-11-23 21:42:55 140081879742208 
[ERROR] Slave SQL: Error executing row event: 'Connection was killed', 
Internal MariaDB error code: 1927

Best Answer

I understand from the comments that your application is writing to more than one DB node. This is known for causing deadlocks, and this appears to be the underlying problem in your first crash log that you uploaded to the MariaDB Jira. If you're using a DB proxy (like MaxScale or ProxySQL), then make sure to use a read-write splitter so you write to only one node, but read from all.