일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- 기타 연주
- JSON
- nvidia-smi
- C
- C#
- windows forms
- 컨테이너
- Selenium
- 프로그래머스
- OpenCV
- mysql
- Numpy
- 핑거스타일
- 오류
- pandas
- VS Code
- pip
- YOLO
- 채보
- ubuntu
- Visual Studio
- C++
- pytorch
- label
- error
- paramiko
- Python
- Linux
- Docker
- SSH
- Today
- Total
기계는 거짓말하지 않는다
Ubuntu Too many open files error (ulimit) 본문
Too many open files error 또는 비슷한 류의 리소스 한계 오류를 보는 경우가 있다.
이 오류는 파일디스크립터 한계 오류이다.
ulimit를 설정하여 해결할 수 있다.
일시, 임시적인 설정 변경
임시적인 자원 한계를 확인, 설정하는 경우
ulimit Man Page - Linux - SS64.com
ulimit User limits - limit the use of system-wide resources. Syntax ulimit [-HS] -a ulimit [-HS] [-bcdefiklmnpqrstuvxPRT] [limit] Key -S Set a soft limit for the given resource. -H Set a hard limit for the given resource. -a All current limits are reported
ss64.com
# 설정된 ulimit 확인
ulimit -a
# open file descriptor 변경
# ex) ulimit -n 4096
ulimit -n [limit]
영구 설정 변경
/etc/security/limits.conf 파일을 수정한다.
계정, 타입, 유형, 한계 순으로 설정하며, 각 항목은 Tab 키를 이용하여 구분한다.
type의 soft는 기본 한계 값이고 hard는 soft 이상의 값에서 더 늘어날 수 있는 최대 값이다.
limits.conf configuration option
limits.conf Man Page - Linux - SS64.com
* A username * A groupname, with @group syntax. This should not be confused with netgroups. * The wildcard *, for default entry. * The wildcard %, for maxlogins limit only, can also be used with %group syntax.
ss64.com
root soft nofile 4096
root hard nofile 4096
'Linux' 카테고리의 다른 글
Ubuntu cuDNN 설치 (0) | 2023.03.25 |
---|---|
Bash Shell Script Parameter 10개 이상 받기 (0) | 2023.03.24 |
Ubuntu apt update GPG error (0) | 2023.03.11 |
Ubuntu Nouveau 비활성화 (NVIDIA Driver Setup) (0) | 2023.03.11 |
Linux 파일, 디렉터리 검색 find 명령어 (0) | 2023.03.05 |