
마스터/슬레이브 복제 기능을 갖춘 두 개의 MySQL 5.1 서버가 설정되어 있습니다. 나는 이전에 몇 년 동안 문제 없이 5.1.41을 사용해 왔습니다. 그러나 5.1.72로 업그레이드한 이후(그리고 INNODB HA 플러그인 활성화와 같은 다른 조정 작업을 수행한 이후) 슬레이브에서 슬레이브 I/O 스레드가 죽어가는 문제가 반복적으로 발생했습니다. 기록되는 메시지는 다음과 같습니다.
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_info 변수가 있지만 5.1.72에서는 지원되지 않는 것 같습니다.
이 문제가 발생할 때마다(2일에 한 번씩) 슬레이브에 연결하고 슬레이브 중지를 실행해야 합니다. 슬레이브 시작; 다음 메시지가 기록되면서 복제가 재개됩니다.
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
아래는 내 구성입니다.
[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/"