Skip to content

Instantly share code, notes, and snippets.

@alexmoout
alexmoout / ubuntu-16-increase-maximum-file-open-limit-ulimit-n.md
Last active September 17, 2020 07:57 — forked from ntamvl/ubuntu-16-increase-maximum-file-open-limit-ulimit-n.md
Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

Ubuntu 16 – how to increase maximum file open limit ( ulimit -n )

If you are setting up nginx,chances are you will discover your worker_connections is at some low number, such as 1024. You can’t increase this number unless you increase kernel limit as well. First of all run cat /proc/sys/fs/file-max to discover your maximum limit.

abc@ubuntu:~$ cat /proc/sys/fs/file-max
1048576
abc@ubuntu:~$ ulimit -n
1024