Mysql InnoDB:警告:从机上发生长信号量等待

Mysql InnoDB:警告:从机上发生长信号量等待,mysql,Mysql,在从服务器上获得信号量等待问题,而在主服务器上没有问题,我们在两台服务器上都设置了基于语句的复制格式 please check log: InnoDB ===================================== 2016-02-07 13:45:01 7f6234107700 INNODB MONITOR OUTPUT ===================================== Per second averages calculated f

在从服务器上获得信号量等待问题,而在主服务器上没有问题,我们在两台服务器上都设置了基于语句的复制格式

please check log:
InnoDB          
=====================================
2016-02-07 13:45:01 7f6234107700 
INNODB MONITOR OUTPUT
=====================================
Per second averages calculated from the last 12 seconds
-----------------
BACKGROUND THREAD
-----------------
srv_master_thread loops: 123609 srv_active, 0 srv_shutdown, 8178587 srv_idle
srv_master_thread log flush and writes: 8302195
----------
SEMAPHORES
----------
OS WAIT ARRAY INFO: reservation count 28333015
--Thread 140059802429184 has waited at buf0flu.cc line 1066 for 182.00 seconds the semaphore:
S-lock on RW-latch at 0x7f6240cc0740 created in file buf0buf.cc line 1016
a writer (thread id 140059812919040) has reserved it in mode  exclusive
number of readers 0, waiters flag 1, lock_word: ffffffffffeffffe
Last time read locked in file trx0undo.ic line 191
Last time write locked in file /export/home/pb2/build/sb_0-11971067-1397081209.01/mysqlcom-pro-5.6.18/storage/innobase/include/fut0fut.ic line 50
OS WAIT ARRAY INFO: signal count 84159677
Mutex spin waits 183112642, rounds 557480936, OS waits 2753586
RW-shared spins 46103919, rounds 347622877, OS waits 3232546
RW-excl spins 72160093, rounds 859445315, OS waits 21726424
Spin rounds per wait: 3.04 mutex, 7.54 RW-shared, 11.91 RW-excl
------------
TRANSACTIONS
------------
Trx id counter 137054
Purge done for trx's n:o < 136999 undo n:o < 5798159 state: running
History list length 394
LIST OF TRANSACTIONS FOR EACH SESSION:
---TRANSACTION 0, not started
MySQL thread id 15677146, OS thread handle 0x7f6234107700, query id 720041959 localhost mysql init
SHOW ENGINE INNODB STATUS
---TRANSACTION 0, not started
MySQL thread id 1400920, OS thread handle 0x7f623a1b5700, query id 720041665 localhost 127.0.0.1 agent1 cleaning up
---TRANSACTION 0, not started
MySQL thread id 1395656, OS thread handle 0x7f623a133700, query id 720041797 localhost agent2 cleaning up
---TRANSACTION 137053, ACTIVE 100 sec
2 lock struct(s), heap size 360, 1 row lock(s), undo log entries 1
---TRANSACTION 137032, ACTIVE 163 sec inserting
mysql tables in use 2, locked 2
1134 lock struct(s), heap size 161320, 472628 row lock(s), undo log entries 471497
MySQL thread id 2, OS thread handle 0x7f623a508700, query id 720039129 Sending data
INSERT INTO ProcessinganyDB.p_crkt
      (TN)
SELECT SUBSTRING(crktline,1,10)
FROM ProcessinganyDB.l_crkt
--------
FILE I/O
--------
I/O thread 0 state: waiting for completed aio requests (insert buffer thread)
I/O thread 1 state: waiting for completed aio requests (log thread)
I/O thread 2 state: waiting for completed aio requests (read thread)
I/O thread 3 state: waiting for completed aio requests (read thread)
I/O thread 4 state: waiting for completed aio requests (read thread)
I/O thread 5 state: waiting for completed aio requests (read thread)
I/O thread 6 state: waiting for completed aio requests (write thread)
I/O thread 7 state: waiting for completed aio requests (write thread)
I/O thread 8 state: waiting for completed aio requests (write thread)
I/O thread 9 state: waiting for completed aio requests (write thread)
Pending normal aio reads: 0 [0, 0, 0, 0] , aio writes: 0 [0, 0, 0, 0] ,
 ibuf aio reads: 0, log i/o's: 0, sync i/o's: 0
Pending flushes (fsync) log: 0; buffer pool: 1
29025985 OS file reads, 33567224 OS file writes, 3611223 OS fsyncs
73.08 reads/s, 16384 avg bytes/read, 182.65 writes/s, 182.65 fsyncs/s
-------------------------------------
INSERT BUFFER AND ADAPTIVE HASH INDEX
-------------------------------------
Ibuf: size 1, free list len 863, seg size 865, 860429 merges
merged operations:
 insert 4269, delete mark 1098716229, delete 0
discarded operations:
 insert 0, delete mark 0, delete 0
Hash table size 276707, node heap has 1 buffer(s)
0.00 hash searches/s, 0.00 non-hash searches/s
---
LOG
---
Log sequence number 1683278874383
Log flushed up to   1683278874383
Pages flushed up to 1683202472156
Last checkpoint at  1683202472156
0 pending log writes, 0 pending chkp writes
584154 log i/o's done, 36.58 log i/o's/second
----------------------
BUFFER POOL AND MEMORY
----------------------
Total memory allocated 137363456; in additional pool allocated 0
Dictionary memory allocated 148656
Buffer pool size   8192
Free buffers       0
Database pages     8182
Old database pages 3000
Modified db pages  2707
Pending reads 0
Pending writes: LRU 0, flush list 2, single page 1
Pages made young 101907031, not young 12722817384
0.00 youngs/s, 219.23 non-youngs/s
Pages read 29025985, created 16632980, written 31115639
73.08 reads/s, 0.00 creates/s, 73.08 writes/s
Buffer pool hit rate 910 / 1000, young-making rate 0 / 1000 not 271 / 1000
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s
LRU len: 8182, unzip_LRU len: 0
I/O sum[7460]:cur[152], unzip sum[0]:cur[0]
--------------
ROW OPERATIONS
--------------
0 queries inside InnoDB, 0 queries in queue
0 read views open inside InnoDB
Main thread process no. 21775, id 140059823408896, state: checking free log space
Number of rows inserted 1128405705, updated 1121540748, deleted 0, read 2939430073
0.00 inserts/s, 0.00 updates/s, 0.00 deletes/s, 0.00 reads/s
----------------------------
END OF INNODB MONITOR OUTPUT
============================

这个问题在一个月内经常出现两次。请在很久以后提出建议,但我希望还有时间为将来的参考提供帮助

在某些情况下,根据MySQL引擎版本的不同,它会在清除线程操作中卡住

作为一种解决方法,您可以使用以下参数值启动服务,witch将跳过创建线程

--innodb_purge_threads=4
如您所见,他们将默认值更改为4,从而清除版本5.7.7上的线程