Score:0

MariaDB crashes frequently

us flag

I'm suffering from MariaDB crashing issue for a weeks running on VPS Debian 10. I searched a lot in the internet ,but couldn't found any solution. I tried this , this, this etc... but seriously I didn't found any solution.

This is the MariaDB error log.

2021-06-15 17:03:53 0 [ERROR] mysqld: Can't lock aria control file '/var/lib/mysql/aria_log_control' for exclusive use, error: 11. Will retry for 30 seconds
2021-06-15 17:04:24 0 [ERROR] mysqld: Got error 'Could not get an exclusive lock; file is probably in use by another process' when trying to use aria control file '/var/lib/mysql/aria_log_control'
2021-06-15 17:04:24 0 [ERROR] Plugin 'Aria' init function returned error.
2021-06-15 17:04:24 0 [ERROR] Plugin 'Aria' registration as a STORAGE ENGINE failed.
2021-06-15 17:04:24 0 [Note] InnoDB: Using Linux native AIO
2021-06-15 17:04:24 0 [Note] InnoDB: Mutexes and rw_locks use GCC atomic builtins
2021-06-15 17:04:24 0 [Note] InnoDB: Uses event mutexes
2021-06-15 17:04:24 0 [Note] InnoDB: Compressed tables use zlib 1.2.11
2021-06-15 17:04:24 0 [Note] InnoDB: Number of pools: 1
2021-06-15 17:04:24 0 [Note] InnoDB: Using SSE2 crc32 instructions
2021-06-15 17:04:24 0 [Note] InnoDB: Initializing buffer pool, total size = 128M, instances = 1, chunk size = 128M
2021-06-15 17:04:24 0 [Note] InnoDB: Completed initialization of buffer pool
2021-06-15 17:04:24 0 [Note] InnoDB: If the mysqld execution user is authorized, page cleaner thread priority can be changed. See the man page of setpriority().
2021-06-15 17:04:24 0 [Note] InnoDB: Starting crash recovery from checkpoint LSN=1138436566
2021-06-15 17:04:24 0 [Note] InnoDB: 128 out of 128 rollback segments are active.
2021-06-15 17:04:24 0 [Note] InnoDB: Removed temporary tablespace data file: "ibtmp1"
2021-06-15 17:04:24 0 [Note] InnoDB: Creating shared tablespace for temporary tables
2021-06-15 17:04:24 0 [Note] InnoDB: Setting file './ibtmp1' size to 12 MB. Physically writing the file full; Please wait ...
2021-06-15 17:04:24 0 [Note] InnoDB: File './ibtmp1' size is now 12 MB.
2021-06-15 17:04:24 0 [Note] InnoDB: Waiting for purge to start
2021-06-15 17:04:24 0 [Note] InnoDB: 10.3.27 started; log sequence number 1138436575; transaction id 567401
2021-06-15 17:04:24 0 [Note] InnoDB: Loading buffer pool(s) from /var/lib/mysql/ib_buffer_pool
2021-06-15 17:04:24 0 [Note] Plugin 'FEEDBACK' is disabled.
2021-06-15 17:04:24 0 [ERROR] Aria engine is not enabled or did not start. The Aria engine must be enabled to continue as mysqld was configured with --with-aria-tmp-tables
2021-06-15 17:04:24 0 [ERROR] Aborting

This is my MariaDB config

[server]


[mysqld]

performance_schema = on
user                    = mysql
pid-file                = /run/mysqld/mysqld.pid
socket                  = /run/mysqld/mysqld.sock
basedir                 = /usr
datadir                 = /var/lib/mysql
tmpdir                  = /tmp
lc-messages-dir         = /usr/share/mysql
bind-address            = 127.0.0.1
query_cache_size = 32M
log_error = /var/log/mysql/error.log
character-set-server  = utf8mb4
collation-server      = utf8mb4_general_ci
innodb_file_per_table = 1
thread_cache_size = 8
myisam_sort_buffer_size = 64M
read_rnd_buffer_size = 8M
read_buffer_size = 2M
sort_buffer_size = 2M
table_open_cache = 512
max_allowed_packet = 512M
key_buffer_size = 384M
[embedded]

[mariadb]

[mariadb-10.3]

There is no spike in the server resources. At the time of checking this was the usage stats.

0.44 (1 min) 0.27 (5 mins) 0.15 (15 mins)

When this error occurs , I kill the proccess id manually and restart the server. This is how I'm dealing with the situation now. I chekced whether there is any folder permission issues in /var/lib/mysql but it is fine, the ownership is mysql:mysql.

You may check the complete error log here.

I really appreciate your help.

ua flag
What does `ls -l /var/lib/mysql/aria_log_control` say? Was this recently upgraded to 10.3?
Kiran RS avatar
us flag
@RickJames - The output is `-rw-rw---- 1 mysql mysql 52 Jun 15 22:19 /var/lib/mysql/aria_log_control` . No, I was never upgrade MariaDB server.
berndbausch avatar
us flag
An [internet search](https://duckduckgo.com/?t=ffab&q=%22Could+not+get+an+exclusive+lock%22+%22%2Fvar%2Flib%2Fmysql%2Faria_log_control%22&ia=web) brought up a few results, such as https://stackoverflow.com/questions/39085279/mysql-cant-lock-aria-control-file. You may also get something out of the [lslock tool](https://unix.stackexchange.com/questions/85994/how-to-list-processes-locking-file).
Kiran RS avatar
us flag
@berndbausch - I really tried a lot of options that is available in the internet , but none of them works. I applied some solutions in my server that I seen in some techincal docs, but there is no heal for this issue. The one of the link you shared here is for raspberry-pi , but in my case the server environment is totally different. Its debian 10 +apache2.4.38+mariadb10.3. In most of the solutions , they're suggesting reinstalling the mariadb server. I'm checking is there any possibility to fix this issue without reinstalling it, because there is alot of production websites on my VPS.
Wilson Hauck avatar
jp flag
@KiranRS When will you tell us how much RAM is on the server?
Kiran RS avatar
us flag
@WilsonHauck- I had upgraded MariaDB to 10.6.4 and issue got resolved.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.