SQLinfo.ru - Все о MySQL

Форум пользователей MySQL

Задавайте вопросы, мы ответим

Вы не зашли.

#1 18.11.2013 20:23:24

Aleksey_2020
Участник
Зарегистрирован: 18.11.2013
Сообщений: 4

Проблема с репликацией

Пытаюсь поднять реплику. Процедура простая, снять дамп, зафиксировать релей лог, разверуть дамп и стартануть слейв с указанием позиции.
Стартанул, пошло, слейв догнал мастера и все тихо и прекрасно. через некоторое время появились расхождения во времени. при этом ошибок в реплике не выдает.

mysql> show slave status;
+----------------------------------+------------------+-------------+-------------+---------------+------------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+--------------------+------------------------+-------------------------+-----------------------------+------------+------------+--------------+---------------------+-----------------+-----------------+----------------+---------------+--------------------+--------------------+--------------------+-----------------+-------------------+----------------+-----------------------+-------------------------------+---------------+---------------+----------------+----------------+
| Slave_IO_State                   | Master_Host      | Master_User | Master_Port | Connect_Retry | Master_Log_File  | Read_Master_Log_Pos | Relay_Log_File         | Relay_Log_Pos | Relay_Master_Log_File | Slave_IO_Running | Slave_SQL_Running | Replicate_Do_DB | Replicate_Ignore_DB | Replicate_Do_Table | Replicate_Ignore_Table | Replicate_Wild_Do_Table | Replicate_Wild_Ignore_Table | Last_Errno | Last_Error | Skip_Counter | Exec_Master_Log_Pos | Relay_Log_Space | Until_Condition | Until_Log_File | Until_Log_Pos | Master_SSL_Allowed | Master_SSL_CA_File | Master_SSL_CA_Path | Master_SSL_Cert | Master_SSL_Cipher | Master_SSL_Key | Seconds_Behind_Master | Master_SSL_Verify_Server_Cert | Last_IO_Errno | Last_IO_Error | Last_SQL_Errno | Last_SQL_Error |
+----------------------------------+------------------+-------------+-------------+---------------+------------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+--------------------+------------------------+-------------------------+-----------------------------+------------+------------+--------------+---------------------+-----------------+-----------------+----------------+---------------+--------------------+--------------------+--------------------+-----------------+-------------------+----------------+-----------------------+-------------------------------+---------------+---------------+----------------+----------------+
| Waiting for master to send event | 10.10.10.1 | userrep    |        3306 |            60 | mysql-bin.000417 |            70570183 | mysql-relay-bin.000062 |     100031984 | mysql-bin.000413      | Yes              | Yes               | dbttt        |                     |                    |                        |                         |                             |          0 |            |            0 |           100031839 |       490245771 | None            |                |             0 | No                 |                    |                    |                 |                   |                |                  3365 | No                            |             0 |               |              0 |                |
+----------------------------------+------------------+-------------+-------------+---------------+------------------+---------------------+------------------------+---------------+-----------------------+------------------+-------------------+-----------------+---------------------+--------------------+------------------------+-------------------------+-----------------------------+------------+------------+--------------+---------------------+-----------------+-----------------+----------------+---------------+--------------------+--------------------+--------------------+-----------------+-------------------+----------------+-----------------------+-------------------------------+---------------+---------------+----------------+----------------+
1 row in set (0.00 sec)


смотрю логи

=====================================
131117 11:06:58 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 20 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 160055, signal count 154653
Mutex spin waits 0, rounds 21840949, OS waits 104525
RW-shared spins 87079, OS waits 29126; RW-excl spins 143445, OS waits 13064
------------
TRANSACTIONS
------------
Trx id counter 0 593101205
Purge done for trx's n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 593101198 undo n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 0
History list length 8
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 593101204, ACTIVE 3565 sec, process no 30873, OS thread id 140394248685312 fetching rows
mysql tables in use 1, locked 1
1406 lock struct(s), heap size 178160, 166937 row lock(s), undo log entries 56538
MySQL thread id 7578, query id 15115522 Reading event from the relay log
TABLE LOCK table `dbttt`.`b_iblock_element` trx id 0 593101204 lock mode IX
RECORD LOCKS space id 0 page no 205802 n bits 72 index `PRIMARY` of table `dbttt`.`b_iblock_element` trx id 0 593101204 lock_mode X locks rec but not gap
Record lock, heap no 4 PHYSICAL RECORD: n_fields 35; compact format; info bits 0
 0: len 4; hex 8009059a; asc     ;; 1: len 6; hex 0000235a0194; asc   #Z  ;; 2: len 7; hex 000006260408b1; asc    &   ;; 3: len 8; hex 8000124f24156eb7; asc    O$ n ;; 4: len 4; hex 8000050f; asc     ;; 5: len 8; hex 8000124f24156eb7; asc    O$ n ;; 6: len 4; hex 8000050f; asc     ;; 7: len 4; hex 80000003; asc     ;; 8: SQL NULL; 9: len 1; hex 59; asc Y;; 10: len 8; hex 8000124f24156d38; asc    O$ m8;; 11: SQL NULL; 12: len 4; hex 800001f4; asc     ;; 13: len 30; hex d09ed0bbd0b8d0bcd0bfd0b8d0b9d181d0bad0b8d0b920d0bed0b3d0bed0; asc                               ;...(truncated); 14: SQL NULL; 15: len 0; hex ; asc ;; 16: len 4; hex 74657874; asc text;; 17: SQL NULL; 18: len 30; hex 0d0a3c703ed09ed0b3d0bed0bdd18c205858494920d0b7d0b8d0bcd0bdd0; asc   <p>           XXII          ;...(truncated); 19: len 4; hex 68746d6c; asc html;; 20: len 30; hex d09ed09bd098d09cd09fd098d099d0a1d09ad098d09920d09ed093d09ed0; asc                               ;...(truncated); 21: len 4; hex 80000001; asc     ;; 22: SQL NULL; 23: len 1; hex 20; asc  ;; 24: SQL NULL; 25: SQL NULL; 26: len 0; hex ; asc ;; 27: len 1; hex 4e; asc N;; 28: len 6; hex 353931323538; asc 591258;; 29: len 30; hex 6f6c696d706979736b69792d6f676f6e2d646f6272616c7379612d646f2d; asc olimpiyskiy-ogon-dobralsya-do-;...(truncated); 30: len 0; hex ; asc ;; 31: len 1; hex 30; asc 0;; 32: SQL NULL; 33: SQL NULL; 34: SQL NULL;

TABLE LOCK table `dbttt`.`b_iblock_element_property` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_iblock_section_element` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_right` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_site` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_title` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_stem` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_text` trx id 0 593101204 lock mode IX
10 LOCKS PRINTED FOR THIS TRX: SUPPRESSING FURTHER PRINTS
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o'
s: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
23034 OS file reads, 1257189 OS file writes, 260295 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 2.50 writes/s, 1.00 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
12522 inserts, 12522 merged recs, 2891 merges
Hash table size 10624987, node heap has 1772 buffer(s)
301349.48 hash searches/s, 1954.00 non-hash searches/s
---
LOG
---
Log sequence number 93 3604960909
Log flushed up to   93 3604957726
Last checkpoint at  93 3604957726
0 pending log writes, 0 pending chkp writes
146855 log i/o'
s done, 0.50 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 5941802354; in additional pool allocated 18538752
Dictionary memory allocated 4627328
Buffer pool size   327680
Free buffers       1
Database pages     325897
Modified db pages  8
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31819, created 1010937, written 3763859
0.00 reads/s, 0.00 creates/s, 1.95 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 30873, id 140388210042624, state: waiting for server activity
Number of rows inserted 69647643, updated 5521804, deleted 2287062, read 2145021156
0.00 inserts/s, 0.00 updates/s, 8.30 deletes/s, 71987.25 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================


в логах на момент зависания реплие:

=====================================
131117 10:07:14 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 20 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 148861, signal count 143460
Mutex spin waits 0, rounds 21499656, OS waits 96447
RW-shared spins 82601, OS waits 27587; RW-excl spins 141900, OS waits 12777
------------
TRANSACTIONS
------------
Trx id counter 0 593099393
Purge done for trx's n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 593099019 undo n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 0
History list length 159
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 593099392, not started, process no 30873, OS thread id 140394248685312
MySQL thread id 7578, query id 15113381 Has read all relay log; waiting for the slave I/O thread to update it
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o'
s: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
23000 OS file reads, 1240045 OS file writes, 253575 OS fsyncs
0.05 reads/s, 16384 avg bytes/read, 10.45 writes/s, 1.60 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
12521 inserts, 12521 merged recs, 2890 merges
Hash table size 10624987, node heap has 1681 buffer(s)
69.10 hash searches/s, 97.10 non-hash searches/s
---
LOG
---
Log sequence number 93 3595497028
Log flushed up to   93 3595490993
Last checkpoint at  93 3588245815
0 pending log writes, 0 pending chkp writes
143295 log i/o'
s done, 1.20 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 5941802354; in additional pool allocated 18455296
Dictionary memory allocated 4627328
Buffer pool size   327680
Free buffers       1
Database pages     325998
Modified db pages  1137
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31763, created 1010803, written 3750277
0.05 reads/s, 0.15 creates/s, 12.00 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 30873, id 140388210042624, state: sleeping
Number of rows inserted 69647235, updated 5521024, deleted 2230569, read 1891803917
23.65 inserts/s, 57.20 updates/s, 2.05 deletes/s, 59.25 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

=====================================
131117 10:07:34 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 20 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 148866, signal count 143465
Mutex spin waits 0, rounds 21499676, OS waits 96448
RW-shared spins 82605, OS waits 27589; RW-excl spins 141902, OS waits 12779
------------
TRANSACTIONS
------------
Trx id counter 0 593101205
Purge done for trx'
s n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 593101023 undo n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 0
History list length 81
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 593101204, ACTIVE 1 sec, process no 30873, OS thread id 140394248685312
mysql tables in use 1, locked 1
38 lock struct(s), heap size 6752, 759 row lock(s), undo log entries 324
MySQL thread id 7578, query id 15115522 Reading event from the relay log
TABLE LOCK table `dbttt`.`b_iblock_element` trx id 0 593101204 lock mode IX
RECORD LOCKS space id 0 page no 205802 n bits 72 index `PRIMARY` of table `dbttt`.`b_iblock_element` trx id 0 593101204 lock_mode X locks rec but not gap
Record lock, heap no 4 PHYSICAL RECORD: n_fields 35; compact format; info bits 0
 0: len 4; hex 8009059a; asc     ;; 1: len 6; hex 0000235a0194; asc   #Z  ;; 2: len 7; hex 000006260408b1; asc    &   ;; 3: len 8; hex 8000124f24156eb7; asc    O$ n ;; 4: len 4; hex 8000050f; asc     ;; 5: len 8; hex 8000124f24156eb7; asc    O$ n ;; 6: len 4; hex 8000050f; asc     ;; 7: len 4; hex 80000003; asc     ;; 8: SQL NULL; 9: len 1; hex 59; asc Y;; 10: len 8; hex 8000124f24156d38; asc    O$ m8;; 11: SQL NULL; 12: len 4; hex 800001f4; asc     ;; 13: len 30; hex d09ed0bbd0b8d0bcd0bfd0b8d0b9d181d0bad0b8d0b920d0bed0b3d0bed0; asc                               ;...(truncated); 14: SQL NULL; 15: len 0; hex ; asc ;; 16: len 4; hex 74657874; asc text;; 17: SQL NULL; 18: len 30; hex 0d0a3c703ed09ed0b3d0bed0bdd18c205858494920d0b7d0b8d0bcd0bdd0; asc   <p>           XXII          ;...(truncated); 19: len 4; hex 68746d6c; asc html;; 20: len 30; hex d09ed09bd098d09cd09fd098d099d0a1d09ad098d09920d09ed093d09ed0; asc                               ;...(truncated); 21: len 4; hex 80000001; asc     ;; 22: SQL NULL; 23: len 1; hex 20; asc  ;; 24: SQL NULL; 25: SQL NULL; 26: len 0; hex ; asc ;; 27: len 1; hex 4e; asc N;; 28: len 6; hex 353931323538; asc 591258;; 29: len 30; hex 6f6c696d706979736b69792d6f676f6e2d646f6272616c7379612d646f2d; asc olimpiyskiy-ogon-dobralsya-do-;...(truncated); 30: len 0; hex ; asc ;; 31: len 1; hex 30; asc 0;; 32: SQL NULL; 33: SQL NULL; 34: SQL NULL;

TABLE LOCK table `dbttt`.`b_iblock_element_property` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_iblock_section_element` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_right` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_site` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_title` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_stem` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_text` trx id 0 593101204 lock mode IX
10 LOCKS PRINTED FOR THIS TRX: SUPPRESSING FURTHER PRINTS
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
23005 OS file reads, 1240225 OS file writes, 253605 OS fsyncs
0.25 reads/s, 16384 avg bytes/read, 9.00 writes/s, 1.50 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
12522 inserts, 12522 merged recs, 2891 merges
Hash table size 10624987, node heap has 1683 buffer(s)
2907.25 hash searches/s, 120.49 non-hash searches/s
---
LOG
---
Log sequence number 93 3596355058
Log flushed up to   93 3596292381
Last checkpoint at  93 3588745572
0 pending log writes, 0 pending chkp writes
143317 log i/o's done, 1.10 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 5941802354; in additional pool allocated 18528512
Dictionary memory allocated 4627328
Buffer pool size   327680
Free buffers       0
Database pages     325997
Modified db pages  1207
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31768, created 1010807, written 3750516
0.25 reads/s, 0.20 creates/s, 11.95 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 30873, id 140388210042624, state: sleeping
Number of rows inserted 69647643, updated 5521804, deleted 2230848, read 1891818189
20.40 inserts/s, 39.00 updates/s, 13.95 deletes/s, 713.56 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================



=====================================
131117 10:09:34 INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 20 seconds
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 149406, signal count 144005
Mutex spin waits 0, rounds 21517345, OS waits 96909
RW-shared spins 82643, OS waits 27602; RW-excl spins 141914, OS waits 12783
------------
TRANSACTIONS
------------
Trx id counter 0 593101205
Purge done for trx's n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 593101198 undo n<img src="img/smilies/yikes.png" width="15" height="15" alt="yikes" /> < 0 0
History list length 8
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0 593101204, ACTIVE 121 sec, process no 30873, OS thread id 140394248685312
mysql tables in use 1, locked 1
232 lock struct(s), heap size 30704, 17945 row lock(s), undo log entries 6711
MySQL thread id 7578, query id 15115522 Reading event from the relay log
TABLE LOCK table `dbttt`.`b_iblock_element` trx id 0 593101204 lock mode IX
RECORD LOCKS space id 0 page no 205802 n bits 72 index `PRIMARY` of table `dbttt`.`b_iblock_element` trx id 0 593101204 lock_mode X locks rec but not gap
Record lock, heap no 4 PHYSICAL RECORD: n_fields 35; compact format; info bits 0
 0: len 4; hex 8009059a; asc     ;; 1: len 6; hex 0000235a0194; asc   #Z  ;; 2: len 7; hex 000006260408b1; asc    &   ;; 3: len 8; hex 8000124f24156eb7; asc    O$ n ;; 4: len 4; hex 8000050f; asc     ;; 5: len 8; hex 8000124f24156eb7; asc    O$ n ;; 6: len 4; hex 8000050f; asc     ;; 7: len 4; hex 80000003; asc     ;; 8: SQL NULL; 9: len 1; hex 59; asc Y;; 10: len 8; hex 8000124f24156d38; asc    O$ m8;; 11: SQL NULL; 12: len 4; hex 800001f4; asc     ;; 13: len 30; hex d09ed0bbd0b8d0bcd0bfd0b8d0b9d181d0bad0b8d0b920d0bed0b3d0bed0; asc                               ;...(truncated); 14: SQL NULL; 15: len 0; hex ; asc ;; 16: len 4; hex 74657874; asc text;; 17: SQL NULL; 18: len 30; hex 0d0a3c703ed09ed0b3d0bed0bdd18c205858494920d0b7d0b8d0bcd0bdd0; asc   <p>           XXII          ;...(truncated); 19: len 4; hex 68746d6c; asc html;; 20: len 30; hex d09ed09bd098d09cd09fd098d099d0a1d09ad098d09920d09ed093d09ed0; asc                               ;...(truncated); 21: len 4; hex 80000001; asc     ;; 22: SQL NULL; 23: len 1; hex 20; asc  ;; 24: SQL NULL; 25: SQL NULL; 26: len 0; hex ; asc ;; 27: len 1; hex 4e; asc N;; 28: len 6; hex 353931323538; asc 591258;; 29: len 30; hex 6f6c696d706979736b69792d6f676f6e2d646f6272616c7379612d646f2d; asc olimpiyskiy-ogon-dobralsya-do-;...(truncated); 30: len 0; hex ; asc ;; 31: len 1; hex 30; asc 0;; 32: SQL NULL; 33: SQL NULL; 34: SQL NULL;

TABLE LOCK table `dbttt`.`b_iblock_element_property` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_iblock_section_element` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_right` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_site` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_title` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_stem` trx id 0 593101204 lock mode IX
TABLE LOCK table `dbttt`.`b_search_content_text` trx id 0 593101204 lock mode IX
10 LOCKS PRINTED FOR THIS TRX: SUPPRESSING FURTHER PRINTS
--------
FILE I/O
--------
I/O thread 0 state: waiting for i/o request (insert buffer thread)
I/O thread 1 state: waiting for i/o request (log thread)
I/O thread 2 state: waiting for i/o request (read thread)
I/O thread 3 state: waiting for i/o request (write thread)
Pending normal aio reads: 0, aio writes: 0,
 ibuf aio reads: 0, log i/o'
s: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 0
23021 OS file reads, 1241552 OS file writes, 253814 OS fsyncs
0.00 reads/s, 0 avg bytes/read, 13.15 writes/s, 1.70 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 5, seg size 7,
12522 inserts, 12522 merged recs, 2891 merges
Hash table size 10624987, node heap has 1697 buffer(s)
288840.01 hash searches/s, 2220.09 non-hash searches/s
---
LOG
---
Log sequence number 93 3597342584
Log flushed up to   93 3597341968
Last checkpoint at  93 3597195929
0 pending log writes, 0 pending chkp writes
143478 log i/o'
s done, 1.30 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 5941802354; in additional pool allocated 18540800
Dictionary memory allocated 4627328
Buffer pool size   327680
Free buffers       1
Database pages     325981
Modified db pages  24
Pending reads 0
Pending writes: LRU 0, flush list 0, single page 0
Pages read 31806, created 1010807, written 3751950
0.00 reads/s, 0.00 creates/s, 13.70 writes/s
Buffer pool hit rate 1000 / 1000
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
1 read views open inside InnoDB
Main thread process no. 30873, id 140388210042624, state: sleeping
Number of rows inserted 69647643, updated 5521804, deleted 2237235, read 1899735333
0.00 inserts/s, 0.00 updates/s, 28.80 deletes/s, 61052.85 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================


на мастее все тихо и спокойно как в морге.

Неактивен

 

#2 18.11.2013 22:18:30

rgbeast
Администратор
MySQL Authorized Developer and DBA
Откуда: Москва
Зарегистрирован: 21.01.2007
Сообщений: 3880

Re: Проблема с репликацией

Что выдает SHOW FULL PROCESSLIST на Slave?

Неактивен

 

#3 19.11.2013 09:49:47

Aleksey_2020
Участник
Зарегистрирован: 18.11.2013
Сообщений: 4

Re: Проблема с репликацией

чисто

mysql> SHOW PROCESSLIST;
+-------+------+-----------+------+---------+------+-------+------------------+
| Id    | User | Host      | db   | Command | Time | State | Info             |
+-------+------+-----------+------+---------+------+-------+------------------+
| 18278 | root | localhost | NULL | Query   |    0 | NULL  | SHOW PROCESSLIST |
+-------+------+-----------+------+---------+------+-------+------------------+
1 row in set (0.00 sec)

Неактивен

 

#4 19.11.2013 13:16:18

Aleksey_2020
Участник
Зарегистрирован: 18.11.2013
Сообщений: 4

Re: Проблема с репликацией

с запущенной репликой


mysql> SHOW FULL PROCESSLIST;
+-------+-------------+-----------+------+---------+--------+----------------------------------+-----------------------+
| Id    | User        | Host      | db   | Command | Time   | State                            | Info                  |
+-------+-------------+-----------+------+---------+--------+----------------------------------+-----------------------+
| 18528 | root        | localhost | NULL | Query   |      0 | NULL                             | SHOW FULL PROCESSLIST |
| 18529 | system user |           | NULL | Connect |    143 | Waiting for master to send event | NULL                  |
| 18530 | system user |           | NULL | Connect | 212154 | Reading event from the relay log | NULL                  |
+-------+-------------+-----------+------+---------+--------+----------------------------------+-----------------------+

Неактивен

 

#5 19.11.2013 17:43:06

rgbeast
Администратор
MySQL Authorized Developer and DBA
Откуда: Москва
Зарегистрирован: 21.01.2007
Сообщений: 3880

Re: Проблема с репликацией

а не могло кончиться место на диске?

Неактивен

 

#6 21.11.2013 13:15:13

Aleksey_2020
Участник
Зарегистрирован: 18.11.2013
Сообщений: 4

Re: Проблема с репликацией

нет, там 1 тер под базу, 1 тер под логи и систему... база 12га...

может чтото в конфиге неправельно указал... или не до указал...

конфиг мастера в прикрепление

оба сервера отличаются только этим

#---Master----------
binlog_cache_size     = 96M
max_binlog_size     = 100M
log_bin         = /var/log/mysql/bin/mysql-bin
binlog_format         = MIXED
binlog_do_db         = db01
sync_binlog          = 0
expire_logs_days     = 10
#-----Slave----
#slave-skip-errors     = 1062
#relay-log         = /var/log/mysql/mysql-relay-bin
#relay-log-index     = /var/log/mysql/mysql-relay-bin.index
#replicate-do-db     = db01
#------------

заметил такую вещь, что сервер стали жрать проц сильно на простые запросы


Прикрепленные файлы:
Attachment Icon mysql.setings.master.20131121_.txt, Размер: 38,204 байт, Скачано: 1,191

Неактивен

 

#7 23.11.2013 23:58:00

paulus
Администратор
MySQL Authorized Developer and DBA
Зарегистрирован: 22.01.2007
Сообщений: 6757

Re: Проблема с репликацией

А в чем, собственно, проблема? У Вас была длинная транзакция на мастере. Потом
транзакция завершилась, свалилась в binlog, доехала до реплики, и Вы получили
отставание. Ну то есть я не вижу никаких проблем в этом. В самом первом сообщении
у Вас видна транзакция, которая длится 3.5к секунд. Вот это она. Любые большие
транзакции на мастере будут создавать такое отставание, ничего не поделаешь.

Неактивен

 

#8 19.02.2014 09:35:49

MaximCarrera
Участник
Зарегистрирован: 08.08.2013
Сообщений: 12

Re: Проблема с репликацией

У меня в итоге появлялись несколько раз расхождения по данным, как будто транзакция не завершалась. Решил разнесением механизмов хранения: на одной машине MyISAM и на другой InnoDB. Паузы на slave тоже сократились.

Неактивен

 

Board footer

Работает на PunBB
© Copyright 2002–2008 Rickard Andersson