반응형

Error Code: 1205. Lock wait timeout exceeded 에러발생시

구글링해보니 보통 다음 2가지 해결책 제시됨

    1. lock timeout 시간을 늘려주라

workbench 기본 read time-out은 30초였는데 늘여도 소용없었음

 

    1. LOCK 테이블에 lock이 존재하는지 확인해보라

use information_schema;
select * from information_schema.INNODB_LOCKS;
select * from information_schema.INNODB_LOCK_WAITS;
select * from information_schema.INNODB_TRX; -- 오랜 시간 동안 Commit 되지 않은 transaction
show full processlist; -- 로 어떤 IP에서 접속했는지 등 정보확인
kill 423911;-- 의심(?)되는 것을 킬

 

참고) https://www.popit.kr/mysql-lock-%EC%83%81%ED%99%A9-%EB%AC%B8%EC%A0%9C-%ED%95%B4%EA%B2%B0/

반응형

+ Recent posts