Page 1 of 1

MariaDB logs three times the size of the DB?

Posted: Mon Jan 31, 2022 4:04 am
by sgomeztd
Hi,

I have a fresh install of Nagios 5.8.7 that I'm finishing populating using the API and I realized that the /var/lib/mysql/binlog files in a few hours can be three or four times the size of the DDBB. Is this normal?

Now it comes by defult the entry "binlog_expire_logs_seconds=86400" on mysql-server.cnf but usually my server runs out of space before the logs are expired. I have increased the /var partition a little but I find strange the logs being so big.

Re: MariaDB logs three times the size of the DB?

Posted: Mon Jan 31, 2022 4:14 pm
by ssax
It's the default change of using binlogs and this not being enough as you've found:

Code: Select all

binlog_expire_logs_seconds=86400
You can drop it down to a lower value and then restart the mysqld process to pick up those changes but I generally disable binlogs on mine following this process:

You can do this to disable and then purge:

Code: Select all

https://dba.stackexchange.com/a/240861
Then do this to permanently disable:

Code: Select all

[mysqld]
disable_log_bin
Taken from here:

https://dba.stackexchange.com/a/226944

Re: MariaDB logs three times the size of the DB?

Posted: Tue Feb 01, 2022 5:15 am
by sgomeztd
Thank you for your reply, I think I will just disable it as well because even if now I have enough space, if the database grows in the future I might again run out of space.

Re: MariaDB logs three times the size of the DB?

Posted: Wed Feb 02, 2022 11:01 am
by ssax
No problem, glad to help! Let us know when we're okay to lock this up and mark it as resolved.

Re: MariaDB logs three times the size of the DB?

Posted: Wed Feb 02, 2022 11:23 am
by sgomeztd
Hi,

Yes, mark it as resolved and locked thanks.