Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question
    
Does a mysqladmin flush-logs free that space? –  Stefan Förster Sep 25 '09 at 21:35
add comment

1 Answer 1

First I'd try "lsof -u mysql" while it's running to see what files MySQL has open. You may also find it more helpful to do "lsof -u mysql | grep deleted" to see files that MySQL still has open but are deleted. If it turns out to be the log files hanging around you could try issuing a "FLUSH LOGS" as a workaround and see if it closes them.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.