Sample Header Ad - 728x90

Number of open file descriptors won't change when I set them in CentOS 6.3?

1 vote
1 answer
1434 views
uname -a Linux lab.testing.com 2.6.18-164.el5 #1 SMP Thu Sep 3 03:33:56 EDT 2009 i686 i686 i386 GNU/Linux ulimit -Hn 1024 ulimit -Sn 1024 ulimit -n 1024 I opened /etc/sysctl.conf in vi and added this at the bottom: fs.file-max = 65536 I opened /etc/security/limits.conf in vi and added this at the bottom: * soft open files 8192 * hard open files 10240 testuser soft open files 8192 testuser hard open files 10240 Whether I login as root or as testuser, and whether I reboot or cold-boot the box, I still get: ulimit -Hn 1024 ulimit -Sn 1024 ulimit -n 1024 I can set the open file descriptors to 10240 at the command line but that only sets it for the session and then it's lost when I logout/login and/or reboot/cold-boot: [root@lab ~]# ulimit -n 10240 [root@lab ~]# ulimit -Hn 10240 [root@lab ~]# ulimit -Sn 10240 [root@lab ~]# ulimit -n 10240 What am I missing? And in case someone wants to see the initial values: [root@itnm ~]# ulimit -a core file size (blocks, -c) 0 data seg size (kbytes, -d) unlimited scheduling priority (-e) 0 file size (blocks, -f) unlimited pending signals (-i) 46464 max locked memory (kbytes, -l) 32 max memory size (kbytes, -m) unlimited open files (-n) 1024 pipe size (512 bytes, -p) 8 POSIX message queues (bytes, -q) 819200 real-time priority (-r) 0 stack size (kbytes, -s) 10240 cpu time (seconds, -t) unlimited max user processes (-u) 46464 virtual memory (kbytes, -v) unlimited file locks (-x) unlimited
Asked by SirDino (11 rep)
Dec 9, 2014, 05:08 AM
Last activity: Jul 6, 2022, 10:00 PM