Project

General

Profile

Bug #338

MariaDB Locking Up

Added by Daniel Curtis about 10 years ago. Updated about 9 years ago.

Status:
Closed
Priority:
High
Assignee:
Category:
Database Server
Target version:
-
Start date:
02/14/2014
Due date:
% Done:

100%

Estimated time:
0.50 h
Spent time:

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/

#1

Updated by Daniel Curtis about 10 years ago

  • Status changed from Resolved to Closed
#2

Updated by Daniel Curtis about 9 years ago

  • Project changed from 80 to GNU/Linux Administration
  • Category set to Database Server

Also available in: Atom PDF