common problem with redHat distrib default config (from
http://www.jivesoftware.com/jive/entry.jspa?externalID=171&categoryID=2 ):
the following is an example of how to do this for RedHat Linux 7.3. The following is an example of the output of
ulimit -aH
You can see that the current shell (and its children) is restricted to 1024 open file descriptors.
invalid link : root@host /(Illegal character in path at index 9: root@host /)# ulimit -aH
core file size (blocks) unlimited
data seg size (kbytes) unlimited
file size (blocks) unlimited
max locked memory (kbytes) unlimited
max memory size (kbytes) unlimited
open files 1024
pipe size (512 bytes) 8
stack size (kbytes) unlimited
cpu time (seconds) unlimited
max user processes 4094
virtual memory (kbytes) unlimited
The file descriptor limit can be increased using the following procedure:
- Edit /etc/security/limits.conf and add the lines:
- soft nofile 1024
- hard nofile 65535
2. Edit /etc/pam.d/login, adding the line:
session required /lib/security/pam_limits.so
3. The system-wide file descriptor limit is set in /proc/sys/fs/file-max. The following command will increase the limit to 65535:
echo 65535 > /proc/sys/fs/file-max
4. Finally, increase the file descriptor limits using:
ulimit -n 8192
5. You may also have to update /etc/sysctl.conf and add/change the fs.file-max setting to:
- Set the maximum number of open files
fs.file-max=65535
Note that you may need to log out and back in again before the changes take effect.