1. 문제점
이번에도 기능 구현 후 빌드를 했다. 빌드과정에서 문제는 없어보였는데 배포한 사이트에 접속해보니 502 bad gateway 가 떴음. 이번에는 무슨 일인가 싶어 서버로그를 확인했는데 Error: System limit for number of file watchers reached ... 에러가 발생하였다. 이후에 파일경로가 있길래 그 파일은 건드리지도 않고 빌드했는데 대체 무슨문제인가 해서 구글 검색을 해보았다.
2. 해결방안
React 처럼 프론트엔드 개발환경에서는 많은 수의 파일감시자가 필요한데, 이 한도를 초과했기 때문에 발생하는 에러라고 한다. 개발을 너무 열심히 하다보면 날 수있다는 에러인데 정말인가
https://github.com/gatsbyjs/gatsby/issues/11406
Error: ENOSPC: System limit for number of file watchers reached, watch '/home/foldername/abcrypto/static' · Issue #11406 · gat
Description The web app compiles but when I reload the website, the compilation end with an error. Steps to reproduce Just type gatsby develop and if you click an article for example or you reload ...
github.com
다음은 파일감시자의 한도를 늘려주는 명령어이다.
echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p
'TIL' 카테고리의 다른 글
TIL 24.06.14 react-dropzone & FormData 데이터 전송 (0) | 2024.06.14 |
---|---|
TIL 24.05.14 react-query refetchOnWindowFocus 옵션 (0) | 2024.05.14 |
TIL 24.04.23 TAR_ENTRY_INVALID checksum 에러 (0) | 2024.04.23 |
TIL 24.04.12 Typescript 타입 에러 무시하기 (0) | 2024.04.12 |
TIL 24.04.03 geolocation 위치 권한 요청 (0) | 2024.04.03 |