Not the answer you need?
Register and ask your own question!

After Dynamic expire_logs_days Change, Only Manual Flushing Works

pmboykopmboyko EntrantCurrent User Role Beginner
Hello!

I've been using Percona Server 5.6 for years, absolutley pleased with it. :)

Because of some unanticipated increase in write activity, I dynamically changed the global expire_logs_days variable on Jul 27 from 5 days as I originally configured since startup (which has always worked fine) to a temporary new value of 2, then I successfully issued the query command FLUSH BINARY LOGS which removed the binlogs I expected fine, but since then the server is not flushing the binary logs on its own as I would expect (see the list below). The index file perfectly matches the actual directory contents (same file order, too) as I've used no OS commands outside of MySQL.

We're using standard MySQL asynchronous replication in a Master-Master setup, each Master has a Slave, and there is no replication lag at all.

5.6.31-77.0-log
Percona Server (GPL), Release 77.0, Revision 5c1061c
debian-linux-gnu (x86_64)
Ubuntu 14


Here's what MySQL currently says:
mysql> select @@expire_logs_days;
+---------------------------+
| @@global.expire_logs_days |
+---------------------------+
|                         2 |
+---------------------------+
1 row in set (0.00 sec)

mysql> show binary logs;
+------------------+------------+
| Log_name         | File_size  |
+------------------+------------+
| mysql-bin.000012 | 1073741948 |
| mysql-bin.000013 | 1073741882 |
| mysql-bin.000014 | 1073742160 |
| mysql-bin.000015 |  670091458 |
| mysql-bin.000016 |  744025466 |
+------------------+------------+
5 rows in set (0.00 sec)


And here's my current binlog directory:
drwxr-xr-x 2 mysql mysql 4.0K Jul 29 06:40 .
drwxr-xr-x 4 mysql mysql 4.0K Jul 20 14:23 ..
-rw-rw---- 1 mysql mysql 1.1G Jul 27 08:51 mysql-bin.000012
-rw-rw---- 1 mysql mysql 1.1G Jul 27 12:36 mysql-bin.000013
-rw-rw---- 1 mysql mysql 1.1G Jul 27 18:12 mysql-bin.000014
-rw-rw---- 1 mysql mysql 640M Jul 29 06:40 mysql-bin.000015
-rw-rw---- 1 mysql mysql 710M Jul 31 06:47 mysql-bin.000016
-rw-rw---- 1 mysql mysql  225 Jul 29 06:40 mysql-bin.index


So I guess my big question is, does MySQL respect the dynamically defined value of expire_logs_days for automatic flushing/rotation?

Thank you so much in advance for your kind feedback.
Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.