Bug #338
MariaDB Locking Up
Description
I encountered a problem where MariaDB was locking up and halting most of my web sites. I logged into the database server and checked the syslog:
ssh db3.example.com tail -n 30 /var/log/syslog
Feb 14 13:06:51 db3 mysqld: 140214 13:06:51 [ERROR] mysqld: Can't open file: './database1/test_table.frm' (errno: 24)
I found a fix on a website suggesting to increase the open files limit in /etc/mysql/my.cnf
:
vi /etc/mysql/my.cnf
...
open-files-limit = 2000
...
I also had a problem restarting the MariaDB service, this was caused by not having a debian-sys-maint
account. I fixed this by locating the password for the debian-sys-maint
:
cat /etc/mysql/debian.cnf | grep password
Take note of the password
Then logging in to the MariaDB server and creating the debian-sys-maint
user:
mysql -u root -p GRANT ALL PRIVILEGES ON *.* TO 'debian-sys-maint'@'localhost' IDENTIFIED BY 'SuperSecretPassword' WITH GRANT OPTION;
Then restart MariaDB:
service mysql restart
Resources
https://major.io/2007/08/19/mysql-errcode-24-when-using-lock-tables/