
가 있는데 /etc/security/limits.conf
적용되지 않은 것 같습니다.
a soft nofile 1048576 # default: 1024
a hard nofile 2097152
a soft noproc 262144 # default 128039
a hard noproc 524288
내 사용자 이름은 어디에 있습니까? 및 를 a
실행하면 다음이 표시됩니다.ulimit -Hn
ulimit -Sn
4096
1024
/etc/security/limits.d
콘텐츠가 포함된 파일은 다음과 같습니다 .
scylla - core unlimited
scylla - memlock unlimited
scylla - nofile 200000
scylla - as unlimited
scylla - nproc 8096
또한 해당 값을 추가한 다음 다시 시작하려고 시도했습니다 /etc/security/limits.conf
.
echo '
session required pam_limits.so
' | sudo tee -a /etc/pam.d/common-session
하지만 작동하지 않았습니다. 내 OS는 Ubuntu 17.04
.
답변1
https://superuser.com/questions/1200539/cannot-increase-open-file-limit-past-4096-ubuntu/1200818#_=_
우분투 16부터 버그가 있었던 것 같습니다.
원래:
/etc/systemd/user.conf
소프트 제한을 편집 하고DefaultLimitNOFILE=1048576
.- 하드 제한을 편집
/etc/systemd/system.conf
하고DefaultLimitNOFILE=2097152
.
신용은 다음과 같습니다@mkasberg.
답변2
그것을 추천합니다편집 하는 /etc/systemd/*.d/
대신 직접 디렉토리를 생성합니다 ./etc/systemd/system.conf
/etc/systemd/user.conf
/etc/systemd/system.conf.d/limits.conf
다음 내용으로 새 파일을 만듭니다 .[Manager] DefaultLimitNOFILE=1048576:2097152 DefaultLimitNPROC=262144:524288
systemctl daemon-reexec
루트로 실행하십시오 .로그아웃했다가 다시 로그인하세요.
최대 열린 파일 및 최대 프로세스에 대해 각각
ulimit -a
또는ulimit -n
및 를 사용하여 새로운 제한을 확인하십시오 .ulimit -u
다음을 참조하세요.systemd-system.conf
맨페이지자세한 내용은.