在MySQL复制中可以做些什么来防止“无法刷新主信息”?

我有两个MySQL 5.1服务器设置与主/从复制。 我以前使用5.1.41几年没有问题。 但是,由于我已经升级到5.1.72(并做了一些其他的调整,例如启用INNODB HA插件),我经历了奴隶I / O线程在从属服务器上死亡的经常性问题。 这是被logging的消息:

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 

有谁知道什么触发master.info文件的刷新? 任何想法,为什么它可能无法被刷新?

我看到后来的MySQL版本有sync_master_infovariables,这在这里可能会有所帮助,但是我不认为它在5.1.72中被支持。

每当发生这个问题(每隔一天大约一次),我必须连接到从站并发出从站; 从属开始; 并且复制将恢复,并logging以下消息:

 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 '[email protected]:3306',replication started in log 'mysql-bin.010913' at position 38278270 

以下是我的configuration:

 [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/"