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 two MySQL 5.1 servers setup with master/slave replication. I was previously using 5.1.41 for several years without issue. However, since I've upgraded to 5.1.72 (and did some other tweaks such as enabling the INNODB HA plugin) I've experienced recurring issues with the Slave I/O thread dying on the slave. This is the message that gets logged:

140506 21:18:33 [ERROR] Failed to flush master info file
140506 21:18:33 [Note] Slave I/O thread exiting, read up to log 'mysql-bin.010913', position 38278270

Does anyone know what triggers the flush of the master.info file? Any idea why it might not be able to be flushed?

I see that later versions of MySQL have sync_master_info variable which might be helpful here, but I don't think it's supported in 5.1.72.

Whenever this issue occurs (which is about once every other day), I have to connect to the slave and issue a slave stop; slave start; and the replication resumes w/ the following messages being logged:

140507  9:46:22 [Note] Error reading relay log event: slave SQL thread was killed
140507  9:46:24 [Note] Slave SQL thread initialized, starting replication in log 'mysql-bin.010913' at position 38278194, relay log '.\SERVERNAME-relay-bin.010971' position: 38278339
140507  9:46:24 [Note] Slave I/O thread: connected to master 'repluser@mydomain.net:3306',replication started in log 'mysql-bin.010913' at position 38278270

Below is my config:

[client]
port                               = 3306
default-character-set              = utf8
[mysql]
[mysqld]
ignore-builtin-innodb
plugin-load                        = innodb
 ;innodb_trx                       = ha_innodb_plugin.dll
 ;innodb_locks                     = ha_innodb_plugin.dll
 ;innodb_lock_waits                = ha_innodb_plugin.dll
 ;innodb_cmp                       = ha_innodb_plugin.dll
 ;innodb_cmp_reset                 = ha_innodb_plugin.dll
 ;innodb_cmpmem                    = ha_innodb_plugin.dll
 ;innodb_cmpmem_reset              = ha_innodb_plugin.dll
port                               = 3306
basedir                            = "C:/Program Files/MySQL/MySQL Server 5.1/"
datadir                            = "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/Data/"
character-set-server               = utf8
default-storage-engine             = INNODB
sql-mode                           = "STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
max_connections                    = 100
query_cache_size                   = 64M
table_cache                        = 256
tmp_table_size                     = 32M
thread_cache_size                  = 20
myisam_max_sort_file_size          = 100G
myisam_sort_buffer_size            = 35M
key_buffer_size                    = 25M
read_buffer_size                   = 64K
read_rnd_buffer_size               = 256K
sort_buffer_size                   = 256K
collation-server                   =  utf8_general_ci
max_heap_table_size                =  32M
query_cache_type                   =  1
thread_cache_size                  =  20
table_open_cache                   =  350
long_query_time                    = 1
slow_query_log                     = 1
innodb_additional_mem_pool_size    = 2M
innodb_flush_log_at_trx_commit     = 2
innodb_log_buffer_size             = 4M
innodb_buffer_pool_size            = 384M
innodb_log_file_size               = 64M
innodb_thread_concurrency          = 8
default-table-type                 =  INNODB
innodb_file_per_table              =  1
innodb_stats_on_metadata           =  0
innodb_old_blocks_time             =  1000
server-id                          = 2
replicate-do-db                    = mydatabase
relay-log                          = SERVERNAME-relay-bin
tmpdir                             = "C:/Documents and Settings/All Users/Application Data/MySQL/MySQL Server 5.1/tmp/"
share|improve this question

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.