2015-01-06 3 views
-1

나는이 예외 상황에 자주 직면하고 있습니다.잠금을 시도 할 때 교착 상태가 발견되었습니다.

2015 1 월 06 14 : 24 : 59.167 잠금 출처 = Data.ResultAccumulator

를 얻을 수하려고 할 때 발견 [0] System.Exception 메시지 = 교착 상태 잠금을 얻으려고 할 때 발견 (심한 경우도 있음) 교착 상태

내 응용 프로그램은 VB.Net 응용 프로그램입니다 및 DataAdapter.Update 방법 나는이 예외를 얻고에서의 DataTable을 사용하여 일괄 갱신을하는 동안 나는 닷넷 버전 6.8.3

에 대한 MySQL의 연결을 사용하고 있습니다. 전체 업데이트 프로세스가 트랜잭션에서 실행 중입니다.

사용자가 Innodb 상태를 분석하도록 제안한이 예외가있는 다양한 스레드가 발견되었습니다. 그래서 나는이 예외를 얻은 후에 그 상태를 취했습니다. 그러나 나는 그것을 분석하는 방법을 모른다. innodb 상태가 있습니다.

 
===================================== 
2015-01-06 14:25:07 2ec INNODB MONITOR OUTPUT 
===================================== 
Per second averages calculated from the last 29 seconds 
----------------- 
BACKGROUND THREAD 
----------------- 
srv_master_thread loops: 7208 srv_active, 0 srv_shutdown, 74547 srv_idle 
srv_master_thread log flush and writes: 81579 
---------- 
SEMAPHORES 
---------- 
OS WAIT ARRAY INFO: reservation count 3583 
OS WAIT ARRAY INFO: signal count 4766 
Mutex spin waits 3514, rounds 53287, OS waits 1608 
RW-shared spins 2281, rounds 46994, OS waits 1262 
RW-excl spins 1304, rounds 36969, OS waits 674 
Spin rounds per wait: 15.16 mutex, 20.60 RW-shared, 28.35 RW-excl 
------------ 
TRANSACTIONS 
------------ 
Trx id counter 1859662 
Purge done for trx's n:o < 1859649 undo n:o < 0 state: running but idle 
History list length 1653 
LIST OF TRANSACTIONS FOR EACH SESSION: 
---TRANSACTION 1859651, not started 
MySQL thread id 127, OS thread handle 0xb00, query id 140079 N0414LEDF0275 10.0.52.40 opkeyapi cleaning up 
---TRANSACTION 1859446, not started 
MySQL thread id 98, OS thread handle 0xf9c, query id 140081 localhost 127.0.0.1 root cleaning up 
---TRANSACTION 0, not started 
MySQL thread id 97, OS thread handle 0x1c28, query id 140080 localhost 127.0.0.1 root cleaning up 
---TRANSACTION 1859658, not started 
MySQL thread id 107, OS thread handle 0x1f78, query id 140109 N0414LEDF0240 10.0.52.129 opkeyapi cleaning up 
---TRANSACTION 1859652, not started 
MySQL thread id 102, OS thread handle 0xed4, query id 140085 N0414LEDF0240 10.0.52.129 opkeyapi cleaning up 
---TRANSACTION 0, not started 
MySQL thread id 90, OS thread handle 0x1f60, query id 81724 localhost 127.0.0.1 root cleaning up 
---TRANSACTION 1859634, not started 
MySQL thread id 46, OS thread handle 0x159c, query id 140015 N0414LEDF0065 10.0.52.133 opkeyapi cleaning up 
---TRANSACTION 1859633, not started 
MySQL thread id 45, OS thread handle 0x1464, query id 140011 N0414LEDF0065 10.0.52.133 opkeyapi cleaning up 
---TRANSACTION 1859630, not started 
MySQL thread id 42, OS thread handle 0x1c00, query id 139999 N0414LEDF0250 10.0.52.128 opkeyapi cleaning up 
---TRANSACTION 1859629, not started 
MySQL thread id 41, OS thread handle 0x1768, query id 139995 N0414LEDF0250 10.0.52.128 opkeyapi cleaning up 
---TRANSACTION 1859649, not started 
MySQL thread id 38, OS thread handle 0x1ac8, query id 140071 N0414LEDF0085 10.0.52.63 opkeyapi cleaning up 
---TRANSACTION 1859650, not started 
MySQL thread id 36, OS thread handle 0x17d8, query id 140075 N0414LEDF0085 10.0.52.63 opkeyapi cleaning up 
---TRANSACTION 1859661, ACTIVE 0 sec 
39 lock struct(s), heap size 2496, 100 row lock(s), undo log entries 224 
MySQL thread id 126, OS thread handle 0x2ec, query id 140356 N0414LEDF0275 10.0.52.40 opkeyapi init 
show engine innodb status 
Trx read view will not see trx with id >= 1859662, sees < 1859662 
-------- 
FILE I/O 
-------- 
I/O thread 0 state: wait Windows aio (insert buffer thread) 
I/O thread 1 state: wait Windows aio (log thread) 
I/O thread 2 state: wait Windows aio (read thread) 
I/O thread 3 state: wait Windows aio (read thread) 
I/O thread 4 state: wait Windows aio (read thread) 
I/O thread 5 state: wait Windows aio (read thread) 
I/O thread 6 state: wait Windows aio (write thread) 
I/O thread 7 state: wait Windows aio (write thread) 
I/O thread 8 state: wait Windows aio (write thread) 
I/O thread 9 state: wait Windows aio (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: 0 
22934 OS file reads, 39569 OS file writes, 9117 OS fsyncs 
3.07 reads/s, 16384 avg bytes/read, 0.55 writes/s, 0.38 fsyncs/s 
------------------------------------- 
INSERT BUFFER AND ADAPTIVE HASH INDEX 
------------------------------------- 
Ibuf: size 1, free list len 36, seg size 38, 2078 merges 
merged operations: 
insert 16494, delete mark 25, delete 2 
discarded operations: 
insert 0, delete mark 0, delete 0 
Hash table size 1602143, node heap has 366 buffer(s) 
53.93 hash searches/s, 61.00 non-hash searches/s 
--- 
LOG 
--- 
Log sequence number 4140114089 
Log flushed up to 4139522989 
Pages flushed up to 4138539042 
Last checkpoint at 4138539042 
0 pending log writes, 0 pending chkp writes 
5282 log i/o's done, 0.17 log i/o's/second 
---------------------- 
BUFFER POOL AND MEMORY 
---------------------- 
Total memory allocated 410091520; in additional pool allocated 0 
Dictionary memory allocated 608237 
Buffer pool size 24704 
Free buffers  1024 
Database pages  23314 
Old database pages 8586 
Modified db pages 249 
Pending reads 0 
Pending writes: LRU 0, flush list 0, single page 0 
Pages made young 9750, not young 279685 
0.59 youngs/s, 19.55 non-youngs/s 
Pages read 22848, created 10791, written 32759 
3.07 reads/s, 3.28 creates/s, 0.31 writes/s 
Buffer pool hit rate 993/1000, young-making rate 1/1000 not 50/1000 
Pages read ahead 0.00/s, evicted without access 0.00/s, Random read ahead 0.00/s 
LRU len: 23314, unzip_LRU len: 0 
I/O sum[15]:cur[77], unzip sum[0]:cur[0] 
-------------- 
ROW OPERATIONS 
-------------- 
0 queries inside InnoDB, 0 queries in queue 
1 read views open inside InnoDB 
Main thread id 2656, state: sleeping 
Number of rows inserted 21162, updated 2520, deleted 131, read 48116841 
7.48 inserts/s, 0.31 updates/s, 0.00 deletes/s, 53.38 reads/s 
---------------------------- 
END OF INNODB MONITOR OUTPUT 
============================ 

아무에게도이 문제를 디버깅하는 방법을 보여줄 수 없으므로 해결 방법을 찾을 수 있습니다.

답변

0

질문의 상태는 교착 상태 정보를 포함하지 않으므로 교착 상태 직후에 취하지 않았습니다.
는 상태이 예처럼 보이는 부분 cointain합니다
상태 데려 가기 전에 서버를 다시 시작되었다고 할 수 없습니다 : 나는에서이 InnoDB의 상태를 가지고 나는 그냥 교착 후를 촬영 한

------------------------ 
LATEST DETECTED DEADLOCK 
------------------------ 
2015-01-06 11:47:02 da8 
*** (1) TRANSACTION: 
TRANSACTION 24103246, ACTIVE 16 sec starting index read 
mysql tables in use 1, locked 1 
LOCK WAIT 3 lock struct(s), heap size 376, 2 row lock(s) 
MySQL thread id 3, OS thread handle 0xde8, query id 102 localhost 127.0.0.1 test 
updating 
update test set test=1 where test=1 
*** (1) WAITING FOR THIS LOCK TO BE GRANTED: 
RECORD LOCKS space id 489 page no 3 n bits 80 index `PRIMARY` of table `test`.`t 
est` trx id 24103246 lock_mode X locks rec but not gap waiting 
Record lock, heap no 2 PHYSICAL RECORD: n_fields 3; compact format; info bits 0 
0: len 4; hex 80000001; asc  ;; 
1: len 6; hex 0000016fc940; asc o @;; 
2: len 7; hex a80000026e0110; asc  n ;; 

*** (2) TRANSACTION: 
TRANSACTION 24103245, ACTIVE 63 sec starting index read, thread declared inside 
InnoDB 5000 
mysql tables in use 1, locked 1 
3 lock struct(s), heap size 376, 2 row lock(s) 
MySQL thread id 4, OS thread handle 0xda8, query id 103 localhost 127.0.0.1 test 
updating 
update test set test=4 where test=4 
*** (2) HOLDS THE LOCK(S): 
RECORD LOCKS space id 489 page no 3 n bits 80 index `PRIMARY` of table `test`.`t 
est` trx id 24103245 lock_mode X locks rec but not gap 
Record lock, heap no 2 PHYSICAL RECORD: n_fields 3; compact format; info bits 0 
0: len 4; hex 80000001; asc  ;; 
1: len 6; hex 0000016fc940; asc o @;; 
2: len 7; hex a80000026e0110; asc  n ;; 

*** (2) WAITING FOR THIS LOCK TO BE GRANTED: 
RECORD LOCKS space id 489 page no 3 n bits 80 index `PRIMARY` of table `test`.`t 
est` trx id 24103245 lock_mode X locks rec but not gap waiting 
Record lock, heap no 5 PHYSICAL RECORD: n_fields 3; compact format; info bits 0 
0: len 4; hex 80000004; asc  ;; 
1: len 6; hex 0000016fc940; asc o @;; 
2: len 7; hex a80000026e0137; asc  n 7;; 

*** WE ROLL BACK TRANSACTION (2) 
------------ 
TRANSACTIONS 
------------ 
+0

을 내 이 교착 상태 예외를 포착 한 로그 파일 만 'show engine innodb status'명령을 실행하여 상태를 찾습니다. 진행중인 트랜잭션이 롤백 된 예외로 인해 예외가 발생한 동일한 트랜잭션 내에서이 트랜잭션을 실행해야합니까? 그런 다음이 상태를 취했습니다. – user4259788

관련 문제