mysql - InnoDB: Warning: a long semaphore wait occouring on slave -


getting semaphore wait issue on slave server while there no issue on master, set statement based replication format on both server

please check log: innodb           ===================================== 2016-02-07 13:45:01 7f6234107700  innodb monitor output ===================================== per second averages calculated last 12 seconds ----------------- background thread ----------------- srv_master_thread loops: 123609 srv_active, 0 srv_shutdown, 8178587 srv_idle srv_master_thread log flush , writes: 8302195 ---------- semaphores ---------- os wait array info: reservation count 28333015 --thread 140059802429184 has waited @ buf0flu.cc line 1066 182.00 seconds semaphore: s-lock on rw-latch @ 0x7f6240cc0740 created in file buf0buf.cc line 1016 writer (thread id 140059812919040) has reserved 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 trx's n:o < 136999 undo n:o < 5798159 state: running history list length 394 list of transactions 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 ---transaction 0, not started mysql thread id 1395656, os thread handle 0x7f623a133700, query id 720041797 localhost agent2 cleaning ---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 processinganydb.p_crkt       (tn) select substring(crktline,1,10) processinganydb.l_crkt -------- file i/o -------- i/o thread 0 state: waiting completed aio requests (insert buffer thread) i/o thread 1 state: waiting completed aio requests (log thread) i/o thread 2 state: waiting completed aio requests (read thread) i/o thread 3 state: waiting completed aio requests (read thread) i/o thread 4 state: waiting completed aio requests (read thread) i/o thread 5 state: waiting completed aio requests (read thread) i/o thread 6 state: waiting completed aio requests (write thread) i/o thread 7 state: waiting completed aio requests (write thread) i/o thread 8 state: waiting completed aio requests (write thread) i/o thread 9 state: waiting 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 , 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   1683278874383 pages flushed 1683202472156 last checkpoint @  1683202472156 0 pending log writes, 0 pending chkp writes 584154 log i/o's done, 36.58 log i/o's/second ---------------------- buffer pool , 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 ============================ 

this issue occurring twice in month ..please suggest

long time after, hope there's still time future references.

in situations (depending on mysql engine version) stuck on purge_threads operation.

as workaround can start service following parameter value, witch skip threads purging creation.

--innodb_purge_threads=4 

as can see here changed default value 4 (which purges threads) on version 5.7.7


Comments

Popular posts from this blog

javascript - jQuery: Add class depending on URL in the best way -

caching - How to check if a url path exists in the service worker cache -

Redirect to a HTTPS version using .htaccess -