mysql:14084
From: "橋本健太" <"橋本健太" <kem@xxxxxxxxxx>>
Date: Mon, 2 Jul 2007 21:15:55 +0900
Subject: [mysql 14084] レプリケーションが一瞬だけ遅れる
クックパッドの橋本と申します。
いつもお世話になっております。
CentOS4.3上で、
マスターがMySQL 4.1.12、スレーブがMySQL 5.0.41のシステムで、
レプリケーションを行っているのですが、不可解な現象に悩まされております。
スレーブでSHOW SLAVE STATUS したときに、Seconds_Behind_Masterが、
一瞬だけ、150秒ほどになったりもどったりするという現象です。
1~2秒の隙間を開けて、4回連続でSHOW SLAVE STATUSしたところ、
以下のようになりました。
(パラメータは一部の抜粋です。省略なしのものを、メールの最後に載せます。)
mysql> show slave status \G
Read_Master_Log_Pos: 150756503
Relay_Log_Pos: 151129280
Exec_Master_Log_Pos: 150753080
Relay_Log_Space: 151132727
Seconds_Behind_Master: 167
mysql> show slave status \G
Read_Master_Log_Pos: 150772717
Relay_Log_Pos: 151149027
Exec_Master_Log_Pos: 150772717
Relay_Log_Space: 151149027
Seconds_Behind_Master: 0
mysql> show slave status \G
Read_Master_Log_Pos: 150808337
Relay_Log_Pos: 151183739
Exec_Master_Log_Pos: 150807249
Relay_Log_Space: 151184835
Seconds_Behind_Master: 167
mysql> show slave status \G
Read_Master_Log_Pos: 150819730
Relay_Log_Pos: 151196286
Exec_Master_Log_Pos: 150819730
Relay_Log_Space: 151196286
Seconds_Behind_Master: 0
この様に、数秒の間に、Seconds_Behind_Masterが、遅れたり、
戻ったりを繰り返すのですが、同じような現象に会ったことがある方、
原因の見当がつくかたなどいらっしゃいますでしょうか。
ネットワークの遅延などがあるのかとも思ったのですが、遅れて
戻った直後に、また同じだけ遅れたりしているので、
原因はまた、ほかの場所にあるのではないかと思っております。、
お知恵をお貸しいただけると助かります。
よろしくお願いいたします。
---- show slave status を4回行った結果 ----
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.100
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: masterdb-bin.001869
Read_Master_Log_Pos: 150756503
Relay_Log_File: slave5-relay-bin.001151
Relay_Log_Pos: 151129280
Relay_Master_Log_File: masterdb-bin.001869
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db1.%,db1.%
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 150753080
Relay_Log_Space: 151132727
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: 167
1 row in set (0.00 sec)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.100
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: masterdb-bin.001869
Read_Master_Log_Pos: 150772717
Relay_Log_File: slave5-relay-bin.001151
Relay_Log_Pos: 151149027
Relay_Master_Log_File: masterdb-bin.001869
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db1.%,db1.%
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 150772717
Relay_Log_Space: 151149027
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: 0
1 row in set (0.00 sec)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.100
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: masterdb-bin.001869
Read_Master_Log_Pos: 150808337
Relay_Log_File: slave5-relay-bin.001151
Relay_Log_Pos: 151183739
Relay_Master_Log_File: masterdb-bin.001869
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db1.%,db1.%
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 150807249
Relay_Log_Space: 151184835
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: 167
1 row in set (0.00 sec)
mysql> show slave status \G
*************************** 1. row ***************************
Slave_IO_State: Waiting for master to send event
Master_Host: 192.168.1.100
Master_User: repl
Master_Port: 3306
Connect_Retry: 60
Master_Log_File: masterdb-bin.001869
Read_Master_Log_Pos: 150819730
Relay_Log_File: slave5-relay-bin.001151
Relay_Log_Pos: 151196286
Relay_Master_Log_File: masterdb-bin.001869
Slave_IO_Running: Yes
Slave_SQL_Running: Yes
Replicate_Do_DB:
Replicate_Ignore_DB:
Replicate_Do_Table:
Replicate_Ignore_Table:
Replicate_Wild_Do_Table: db1.%,db1.%
Replicate_Wild_Ignore_Table:
Last_Errno: 0
Last_Error:
Skip_Counter: 0
Exec_Master_Log_Pos: 150819730
Relay_Log_Space: 151196286
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: 0
1 row in set (0.00 sec)
--
橋本健太
世界最大の料理サイト! 「クックパッド」 - http://cookpad.com
スタッフ大募集中! - http://cookpad.com/jobs/
-> 14084 2007-07-02 21:15 ["橋本健太" <kem@xxxx] レプリケーションが一瞬だけ遅れる 14085 2007-07-03 16:46 ┗["Katsuyuki Sakai" <s] 14086 2007-07-03 21:08 ┗["橋本健太" <kem@xxxx] 14087 2007-07-03 22:07 ┗["Katsuyuki Sakai" <s] 14088 2007-07-03 22:45 ┣[<kenrouse@xxxxxxxxxx] 14089 2007-07-04 00:45 ┗["Yoshinori Matsunobu] 14090 2007-07-04 01:51 ┗["Katsuyuki Sakai" <s] 14096 2007-07-05 00:45 ┗["橋本健太" <kem@xxxx]