-
yum update와 OOM인프라/linux 2024. 4. 18. 20:49
RHEL 9.3 버전에서 snapd를 설치하는 중 만난 이슈를 해결하는 과정을 정리합니다.
1. 이슈 원인 파악
snapd를 설치하기 위해서 다음과 같은 명령어를 호출했습니다.
$ sudo yum install install https://dl.fedoraproject.org/pub/epel/epel-release-latest-9.noarch.rpm $ sudo yum update
보통은 조금 기다리면 설치가 진행이 되는데 killed가 되었다고 합니다.
GPT에게 물어보니 메모리 부족은 아닐지 찾아보라고 합니다
OOM에 관련된 로그가 있는지 살펴보러 갑니다.
$ sudo cat /var/log/messages
낮익은 로그들이 있습니다. OOM Killer에 의해 프로세스가 정리되었다고 하는군요.
2. 이슈 해결
시도1 - 사용 중인 프로그램 종료
프리티어 EC2를 사용하고 있기 때문에 사용할 수 있는 메모리의 양이 굉장히 제한적입니다.
우선 실행되고 있는 nginx를 종료하고 다시 시도해보겠습니다.
$ sudo nginx -s stop $ sudo systemctl status nginx
하지만 여전히 되지 않습니다.
시도2 - swapfile 추가
스왑파일을 적용하고 다시 시도해봅니다. ( 스왑파일에 관한 내용은 왼쪽의 링크를 살펴봐주세요 )
바로 업데이트가 complete! 되었습니다ㅎㅎ
감사합니다.
[참고 자료]
https://repost.aws/ko/knowledge-center/ec2-memory-swap-file
'인프라 > linux' 카테고리의 다른 글
Swapfile은 무엇이길래 메모리 부족을 해결해주는가? (0) 2024.04.18 자주 사용하는 리눅스 명령어 정리 (0) 2024.04.18 RHEL에서 port에 실행 중인 프로세스 확인하기 (0) 2024.04.12 scp - secured copy protocol (0) 2024.03.22 Linux에서 사용자에 따른 환경변수 설정 (0) 2024.03.17