mysqlamazon-rdsmysqlbinlog

MySQL RDS read replica service is not purging binlogs


We have a replica read database for MySQL (5.6.41) on AWS RDS service, which worked OK for the last 2 years, but it suddenly started to behave very differently during last 3 weeks: it uses space and is not normally returning it back. So I had to buy more storage for it to continue operating (you can see 2 peaks in the screenshot). enter image description here As I see the problem is that some daemon is automatically calling PURGE BINARY LOGS BEFORE 'mysql-bin-changelog.10xxxx'; but that log "10xxxx" is not deleted and just stays there. I've checked INNODB MONITOR OUTPUT, there is NO long time active transactions, show processlist shows NOTHING, yet ~100% CPU is used enter image description here space is not reclaiming! SHOW BINARY LOGS; shows >5200 records and this number continues to grow.

I've tried to close all incoming connections, even turned off "event scheduler" and replication process. Still the picture is not healthy: enter image description here CPU is just stuck at >50%! And there are NO sessions in DB (just rdsadmin@localhost)

Can you help me with the cause and how to recover? Because for now I have to buy ~50GB per 3-4 days for "nothing".

For now ANSWER: we've contacted AWS Support (paid developer support), but they did not find anything special and said that the problem is on their side in hardware probably. So we had to create new replica and migrate our custom schemas to it, killed the problematic one after that.


Solution

  • I will answer own question, because have not found any better solution, even after contacting and investigating with AWS Support.

    We've contacted AWS Support (paid developer support), but they did not find anything special and said that the problem is on their side in hardware probably. So we had to create new replica and migrate our custom schemas to it, killed the problematic one after that.