Reason for lot of small relay log file formation. I Have setup a slave and it relay log rotates to soon and creates thousands of relay log file.whats the reason for more relay log formation.
2 Answers
Two possible reasons seem to stick out, ensure your server_id is different on both the master and the slave. This is to be defined at startup in the cnf file.
Another option is you specified a very tiny max_binlog_size or max_relay_log_size, ensure the values are what you want and not off by an order of magnitude (eg. 512k instead of 512M)
- 5,293
- 5
- 41
- 62
Here is one for the ages
I wrote an answer to a post on Jan 02, 2015 entitled mysql replication master 5.5 slave 5.1 error on create database. In that post, I learned from my boss about this strange situation when I was replicating from a MySQL 5.5 Master to a MySQL 5.6 Slave.
In short, I learned from some additional research that binary log events can change size and shape between major releases of MySQL.
This situation caused the following on the Slave:
- mysqld crashed
- mysqld_safe looped back and restarted mysqld
--skip-slave-startwas not configured- mysqld crashed and restarted indefinitely
- relay logs piled up to the heavens
- I had to kill mysqld_safe to stop this craziness.
The solution for this scenario was to upgrade the Master to 5.6.
I also have a 3.5 year old post (Tons and tons of relay logs on a master) covering other situations.
- 185,223
- 33
- 326
- 536