0

On Ubuntu 16.04 AWS system with 32 GB ram and 4 CPU, the following commands fail,

root@ip-10-0-0-189:/home/ubuntu# sysctl -w fs.file-max=10000000 **(ten million)**
fs.file-max = 10000000
root@ip-10-0-0-189:/home/ubuntu# ulimit -n 2000000 **(2 million)**
**bash: ulimit: open files: cannot modify limit: Operation not permitted**
root@ip-10-0-0-189:/home/ubuntu# 

Is there any upper limit on value that can be set on ulimit?

suresh
  • 103
  • 1
  • 4

1 Answers1

3

I have small investigation and able to change this situation on my Ubuntu 14.04. You should change fs.nr_open value in sysctl.conf, e.g. sysctl -w fs.nr_open=10000000, after this you could change your limits as you want.

root@:~# sysctl -w fs.nr_open=1000000
root@:~# ulimit -n 2000000
root@:~# ulimit -n
2000000

More info about this case I found in this answer.

Alexander Tolkachev
  • 4,608
  • 3
  • 14
  • 23