메모리가 부족하거나 디스크 공간이 부족합니까?

메모리가 부족하거나 디스크 공간이 부족합니까?

데이터베이스 로딩 프로세스(osm2pgsql)를 실행 중인데 실패했습니다.

Processing: Node(17404k 148.8k/s) Way(1351k 6.38k/s) Relation(9520 29.94/s)way_done failed: ERROR:  could not extend file "base/140667/152463": No space left on device
HINT:  Check free disk space.
(7)
Arguments were: 187226311, 

가져오기 시작 시 다음 mem을 보고합니다.

             total       used       free     shared    buffers     cached
Mem:           31G        29G       2.4G         0B       178M        24G
-/+ buffers/cache:       4.5G        26G
Swap:           0B         0B         0B

종료 직전:

             total       used       free     shared    buffers     cached
Mem:           31G        31G       227M         0B       178M        26G
-/+ buffers/cache:       4.8G        26G
Swap:           0B         0B         0B

한편, df시작 시:

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/vda1       10309828   7879412   1997036  80% /
udev            16470572        12  16470560   1% /dev
tmpfs            6590080       260   6589820   1% /run
none                5120         0      5120   0% /run/lock
none            16475196         0  16475196   0% /run/shm
none              102400         0    102400   0% /run/user
/dev/vdb       247709760 105978300 129148548  46% /mnt

그리고 프로세스의 약 3/4부터. 100%로 사용됩니다.

Filesystem     1K-blocks      Used Available Use% Mounted on
/dev/vda1       10309828   9854348     22100 100% /
udev            16470572        12  16470560   1% /dev
tmpfs            6590080       260   6589820   1% /run
none                5120         0      5120   0% /run/lock
none            16475196         0  16475196   0% /run/shm
none              102400         0    102400   0% /run/user
/dev/vdb       247709760 105978300 129148548  46% /mnt

/dev/vda1을 채우고 있는 디스크의 실제 파일을 식별할 수 없습니다.

du -h -d 3 / 2>/dev/null | grep -v ^0 > /tmp/o2p1.txt
[start import]
du -h -d 3 / 2>/dev/null | grep -v ^0 > /tmp/o2p2.txt

diff /tmp/o2p1.txt /tmp/o2p2.txt

그것은 아무것도 드러내지 않습니다.

무슨 일이야?

답변1

좋아, 간단했어. Postgres 데이터베이스는 /dev/vda1에 있었고 점점 커지고 있었습니다. du루트로 실행하지 않았기 때문에 명령 에 표시되지 않았습니다 .

디스크가 가득 차면 Postgres는 디스크 저장을 중단하고 메모리가 부족할 때까지 모든 것을 메모리에 유지합니다.

관련 정보