主从同步延时
贴一下slave的状态mysql> show slave status\G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 10.100.10.11
Master_User: syn
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: master-bin.000632
Read_Master_Log_Pos: 704773197
Relay_Log_File: slave-relay-bin.000098
Relay_Log_Pos: 972497783
Relay_Master_Log_File: master-bin.000612
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table:
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 972497636
Relay_Log_Space: 22233717691
Until_Condition: None
Until_Log_File:
Until_Log_Pos: 0
Master_SSL_Allowed: No
Master_SSL_CA_File:
Master_SSL_CA_Path:
Master_SSL_Cert:
Master_SSL_Cipher:
Master_SSL_Key:
Seconds_Behind_Master: 73650
Master_SSL_Verify_Server_Cert: No
Last_IO_Errno: 0
Last_IO_Error:
Last_SQL_Errno: 0
Last_SQL_Error:
Replicate_Ignore_Server_Ids:
Master_Server_Id: 1
1 row in set (0.00 sec)
几个异常点
Seconds_Behind_Master: 73650
Master_Log_File: master-bin.000632
Read_Master_Log_Pos: 704773197
Relay_Log_File: slave-relay-bin.000098
Relay_Log_Pos: 972497783
Relay_Master_Log_File: master-bin.000612
同步非常慢,寻求问题状态及解决方法
是长时间累计后这么多延时的?还是偶尔这么多延时,过一段时间久追上了? 昨天slave是master-bin.000595 今天追到master-bin.000612了,我从Exec_Master_Log_Pos上看,没有数字变化,也就是当前slave没有在执行binlog。 不知你数据量有多大?
当前压力有多大?
主备机有硬件性能差异吗?
MySQL版本多少?
...
总之检查下IP地址、配置文件、慢日志等,看看有没有大SQL执行等
再不行就重新建立下同步,找问题...
页:
[1]