Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Disable aria logs mariaDB

Tags:

mariadb

MariaDB is suddenly logging aria_log.0000xx files. These files are (by default) 1.1GB but I keep getting these files every few minutes, eventually running out of diskspace. There are a lot of transactions going on so that might explain the amount of files but I can't find a way to disable it.

It's not binary logging. Log_bin is set to off and when trying to show the binary logs "You are not using binary logging" message appears.

The only thing I can find about aria_logs is how to change the default size and how to purge them. Is there a way to disable these files from logging?

like image 320
biggydeen Avatar asked Dec 06 '25 04:12

biggydeen


2 Answers

You may want to change the config option aria_log_purge_type. If its value is set to "at_flush" then the logs are kept until you FLUSH ENGINE LOGS.

The default value is "immediate" which I assume means to drop the log files as soon as they are no longer needed. But the documentation is pretty sparse about this option.

If they are not dropped immediately, you can purge them. https://mariadb.com/kb/en/flush/ says:

FLUSH ENGINE LOGS will delete all unneeded Aria redo logs.

I'm not a MariaDB user, so that's all I know about this. I suggest to read the documentation. Perhaps there's more information in blogs or articles about MariaDB.

like image 194
Bill Karwin Avatar answered Dec 09 '25 20:12

Bill Karwin


I had the same problem and could not find any way to disable generating of these huge aria_logs. But thanks to @BillKarwin's answer which leads me to "Aria System Variables" documentation I could find a way to limit these log files growth. Here is the trick which worked for me (just for limiting the files growth):

add below lines in your mariadb configuration file under [mysqld] section wich generally located in /etc/my.cnf or /etc/mysql/mariadb.cnf in linux:

[mysqld]
aria_log_file_size=100M
aria_log_purge_type=immediate

I limited the aria_log file size to 100 Megabytes, because it seems its a critical file for system replication and maybe required for some jobs (I guess this is why mariadb doesn't support any options to completely disable these logs) but you can use your own limits if you know what you're doing.

like image 34
Mojtaba Rezaeian Avatar answered Dec 09 '25 20:12

Mojtaba Rezaeian



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!