2

I am using CentOS 7. I found out that the current value can be seen using $ ulimit -a (look for open files).

Or just $ ulimit -n

Then I try to edit these limits by editing the file at

$ vim /etc/security/limits.conf

and adding these two lines:

soft nofile 999999
hard nofile 999999

And after doing a quick reboot and checking if something has happened

$ ulimit -n

It is still the same, I get 1024 as output.

How do I change this value and make it persist after a reboot?

M. Glatki
  • 1,964
  • 1
  • 17
  • 33
Alex
  • 301
  • 2
  • 7
  • 14
  • 1
    Possible duplicate of [Setup "open files" limit in Linux per user. Cannot setup more than 1024](http://serverfault.com/questions/195288/setup-open-files-limit-in-linux-per-user-cannot-setup-more-than-1024) – M. Glatki Apr 26 '16 at 19:31

1 Answers1

4

You need the user part at the start, and the wrong way around, should be:

* soft nproc 65535
* hard nproc 65535
* soft nofile 65535
* hard nofile 65535
epea
  • 406
  • 1
  • 9
  • 19