메뉴 닫기

mysqldump: Got error: 23: Out of resources when opening file ‘./servpem/zetyx_d.MYD’ (Errcode: 24) when using LOCK TABLES 관련로그 출력시

mysql openfile이 많아서 테이블이 잠겼다는 내용입니다

이럴때는 덤프 옵션에

–single-transaction 을 사용하여 백업 하면 에러 없이 백업을 하실수 있습니다

예제)
mysqldump –single-transaction -u root -p –all-databases > allDB.sql

또 다른 방법으로는

mysql을 재시작하여 열려 있던 파일 초기화 후 덤프 하는 방법이 있습니다

openfile 확인 명령어

ulimit -a

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 32617
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 32617
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

open file 변경

ulimit -n 2048

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 0
file size (blocks, -f) unlimited
pending signals (-i) 32617
max locked memory (kbytes, -l) 32
max memory size (kbytes, -m) unlimited
open files (-n) 2048
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time priority (-r) 0
stack size (kbytes, -s) 10240
cpu time (seconds, -t) unlimited
max user processes (-u) 32617
virtual memory (kbytes, -v) unlimited
file locks (-x) unlimited

 

[polldaddy rating=”7739789″]

Subscribe
Notify of
guest
0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x