root@ip-172-31-37-60:/home/ubuntu/server# npm start
npm ERR! code ENOSPC
npm ERR! syscall write
npm ERR! errno -28
npm ERR! nospc ENOSPC: no space left on device, write
npm ERR! nospc There appears to be insufficient space on your system to finish.
npm ERR! nospc Clear up some disk space and try again.
npm ERR! A complete log of this run can be found in:
npm ERR! /root/.npm/_logs/2022-05-25T09_20_40_235Z-debug-0.log
root@ip-172-31-37-60:/home/ubuntu/server# sudo apt-get purge
Reading package lists... Error!
E: Write error - write (28: No space left on device)
E: IO Error saving source cache
E: The package lists or status file could not be parsed or opened.
구글링을 통해 해당 에러 The package lists or status file could not be parsed or opened
입력
sudo rm /var/lib/apt/lists/* -vf
sudo apt-get clean
sudo apt-get update
apt-get을 비워준 후, 정상적으로 서버가 실행되는 것을 확인할 수 있었다.
아마 apt-get에 캐쉬된 데이터가 너무 많아 명령어를 수행할 수 있는 리소스가 더 이상 남아 있지 않아 발생한 오류로 생각된다.
또한, 해당 에러가 발생했을 시 무중단 배포 기능을 하는 pm2도 일부 기능을 수행할 수 없는 것 같다.
( 내 경우 클라이언트에서 사진을 업로드 했을 때 500번 에러를 뱉어냈고, 서버로는 요청 후 로그가 찍히지 않았다.)