1

i want to increase the open file descriptor size in linux current size is

ulimit -n

returns 1024 i want to increase it to 65535 because my elasticsearch process needs it here is the link i am following https://www.elastic.co/guide/en/elasticsearch/reference/current/setting-system-settings.html#limits.conf

i did added following line in /etc/security/limits.conf

*     soft   nofile  1024
*     hard   nofile  65535 
root     soft   nofile  1024
root     hard   nofile  65535 

rebooted the system and ulimit -n still returning 1024

another solution i added these lines in /etc/security/limits.conf

*    soft nofile 64000
*    hard nofile 64000
*        -  nproc   16384
root        -  nproc   16384
root soft nofile 64000
root hard nofile 64000

and /etc/pam.d/common-session needs to have this line in it:

session required pam_limits.so

and added following line in /etc/pam.d/common-session-noninteractive :

session required pam_limits.so

rebooted the system and it did not worked either followed this link as well https://docs.oracle.com/cd/E19623-01/820-6168/file-descriptor-requirements.html it gives error on the last command

 ulimit -n unlimited
bash: ulimit: open files: cannot modify limit: Operation not permitted

and

 sudo ulimit -n unlimited
sudo: ulimit: command not found

my elasticsearch process is giving me this error

[1]: max file descriptors [4096] for elasticsearch process is too low, increase to at least [65535]

any help would be appreciated

sarah w
  • 243

0 Answers0