[MDEV-9960] Binary log not rotating Created: 2016-04-21 Updated: 2017-12-18 Resolved: 2017-12-12 |
|
| Status: | Closed |
| Project: | MariaDB Server |
| Component/s: | Locking, Storage Engine - InnoDB |
| Affects Version/s: | 5.5, 10.0 |
| Fix Version/s: | 10.1.30 |
| Type: | Bug | Priority: | Major |
| Reporter: | TYNDALE BANZA | Assignee: | Andrei Elkin |
| Resolution: | Duplicate | Votes: | 2 |
| Labels: | None | ||
| Environment: |
3 node Galera Cluster |
||
| Attachments: |
|
||||||||||||||||||||
| Issue Links: |
|
||||||||||||||||||||
| Sprint: | 10.1.15, 10.1.20, 10.1.22, 10.1.29 | ||||||||||||||||||||
| Description |
|
There is an intermittent bug whereby the binary log does not rotate . The binary log size is set at 100MB yet there are times it does not rotate and exceeds 100MB . The binary log has sometimes grown to 60GB in size . Commands like FLUSH LOGS do not achieve rotation . When a binary log file becomes more than 10 days old, it is supposed to be deleted by the database server , this is not happening once hit by the bug . The Mariadb node has to be restarted to rotate the binary log once it grows above 100MB . Parameters like max-bin-log and expire-logs-days are configured correctly . max_binlog_size | 104857600 |
| Comments |
| Comment by Elena Stepanova [ 2016-04-22 ] |
|
nirbhay_c, |
| Comment by John Burwell [ 2016-05-03 ] |
|
We are seeing the same behavior on a non-replicated, single node MariaDB 5.5.40 instance. We have set expire_logs_days to 10 and max_binlog_size to 307100. With these settings in place, we continue to see unbounded binary log growth. |
| Comment by Nirbhay Choubey (Inactive) [ 2016-05-03 ] |
|
jburwell Is it MariaDB server or MariaDB Galera server that you are using? Could you share the last few events from the binary log file? What are the config options? |
| Comment by John Burwell [ 2016-05-03 ] |
|
nirbhay_c MariaDB server only – no Galera usage. Would the previous 20 bin log events be sufficient? |
| Comment by Nirbhay Choubey (Inactive) [ 2016-05-03 ] |
|
Yes.. and please also do share your server's configurations. |
| Comment by John Burwell [ 2016-05-03 ] |
|
nirbhay_c I have requested permission to share this information with you. As soon as I receive it, I will attach the requested information to this ticket. Thank you for your quick response and assistance with this issue. It is greatly appreciated. |
| Comment by Nirbhay Choubey (Inactive) [ 2016-05-03 ] |
|
jburwell In case you are not comfortable sharing those details here |
| Comment by John Burwell [ 2016-05-10 ] |
|
nirbhay_c I apologize for my delayed response. Per your request, I have attached a recent binary log file (mysql-bin.001551) and the sanitized results of SHOW VARIABLES (configuration.txt). Thank you again for your help. |
| Comment by John Burwell [ 2016-05-24 ] |
|
nirbhay_c have you had a chance to review the attached bin log and configuration information? |
| Comment by Arjen Lentz [ 2016-06-18 ] |
|
Is someone working on this? There's clearly an issue, experienced by different people. We appreciate it's an intermittent problem and the config may not clarify much, but the problem can be really damaging on a production system as it can make it run out of space. Has someone just had a look at the source code to see if anything eye-catching is happening there in the logic? |
| Comment by Arjen Lentz [ 2016-06-18 ] |
|
As a related thought - there is a scenario where the log doesn't get rotated/expired if there are still open transactions (semaphore waits related to those), systems sometimes have long-running transactions for perfectly valid reasons. Perhaps the two are related? Below is a snippet from SHOW ENGINE INNODB STATUS |
| Comment by Nirbhay Choubey (Inactive) [ 2016-12-06 ] |
|
I tried performing some log rotations while having an active long transaction, and rotation |
| Comment by Daniel Black [ 2017-03-01 ] |
|
Folks, In light of the number of log-rotation based stalls, crashes I created the workaround in If you have any issues with this patch please note it on the github PR or in |
| Comment by Andrei Elkin [ 2017-10-23 ] |
|
Lack of expected rotation is a symptom of the parent of the current issue and is explained in its patch (to be reviewed atm). |
| Comment by Andrei Elkin [ 2017-10-25 ] |
|
The current issue seems to aggregate two separate ones. |
| Comment by Andrei Elkin [ 2017-12-12 ] |
|
The very reported cluster-related issue has been fixed by Thanks. |