본문 바로가기

CodeGate

Resetting the Host Machine's File Descriptors

  1. First, check the current system limit for file descriptors:
    cat /proc/sys/fs/file-max
  2. If the setting is lower than 64000, edit the /etc/sysctl.conf file, and reset the fs.file-max parameter:
    fs.file-max = 64000
  3. Then increase the maximum number of open files on the system by editing the /etc/security/limits.confconfiguration file. Add the following entry:
    *        -        nofile        8192
  4. Edit the /etc/pam.d/system-auth, and add this entry:
    session required /lib/security/$ISA/pam_limits.so
  5. Reboot the machine to apply the changes.