Q:

MySQL Master-Master replication generating thousands of log files

Today, I checked the /var/lib/mysql/ directory of a server in a master-master replication setup and noticed there were about 3,600 slave-relay.00xxxx files in there (where "xxxx" is an incrementing integer).
They appear to be binary log files and don't take up much space (only about 42K), but are they an indication that something is wrong?
They range in date from August until today with about 25 per day.
Thanks for any help.

A:

You can read this from dev.mysql.
Mysqld appends a numeric extension to the binary log basename to generate binary log file names.
The number increases each time the server creates a new log file, thus creating an ordered series of files.
The server creates a new file in the series each time it starts or flushes the logs. 
The server also creates a new binary log file automatically after the current log's size reaches max_binlog_size.
A binary log file may become larger than max_binlog_size if you are using large transactions because
a transaction is written to the file in one piece, never split between files.

In summary, you can relate the number of log files to the number of transactions and queries you are executing. Also, the maximum size of log file can affect how many files you will have.
If you know your database is always busy executing queries (doing insert/update/delete), this should be normal.

