I have the following settings in my /etc/my.cnf
log-bin = /var/lib/mysql_bin_logs/mysql-bin.log expire_logs_days = 3 max_binlog_size = 100M relay-log = /var/lib/mysql/slave-relay.log relay-log-index = /var/lib/mysql/slave-relay-log.index log-slave-updates
and I can see that the
/var/lib/mysql_bin_logs/ folder remains at a constant size. However the disc is filling up and I think it is to do with the file descriptor's for these binary log file not being closed properly. When I restart MySQL, disk usage drops by several Gigabytes, suggesting that act of restarting is freeing up the space.
How do I prevent the disk being filled up this way other than restarting MySQL on a cronjob?