[ubuntu] open files limit 변경하기[ubuntu] open files limit 변경하기

Posted at 2012. 9. 16. 13:40 | Posted in OS/Unix/Linux

redhat(centOS 등)계열은 ulimit -n 으로 쉽게 설정 가능하나,

우분투는 잘 안되네..

다음과 같이 해서 해결.


system-wide limit on the number of open files for all processes

$ cat /proc/sys/fs/file-max

148608

 

계정별 open file limit

$ ulimit -n

1024

 


다음 2개 파일을 수정 (box안의 내용을 추가)


/etc/pam.d/common-session ==> 안해도 됨 (/etc/pam.d/login 에 설정돼 있네..)

session    required   pam_limits.so


/etc/security/limits.conf

*   ?   nofile     6000

 


<reboot>

$ ulimit -n

6000

//