MariaDB logs three times the size of the DB?

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
sgomeztd
Posts: 51
Joined: Tue Apr 30, 2019 11:00 am

MariaDB logs three times the size of the DB?

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post 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
sgomeztd
Posts: 51
Joined: Tue Apr 30, 2019 11:00 am

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

Post 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.
ssax
Dreams In Code
Posts: 7682
Joined: Wed Feb 11, 2015 12:54 pm

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

Post by ssax »

No problem, glad to help! Let us know when we're okay to lock this up and mark it as resolved.
sgomeztd
Posts: 51
Joined: Tue Apr 30, 2019 11:00 am

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

Post by sgomeztd »

Hi,

Yes, mark it as resolved and locked thanks.
Locked