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?

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.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.