$ sudo vim /etc/sysctl.conf
fs.file-max = 2097152
$ sudo sysctl -p
$ sudo vim /etc/security/limits.conf
* soft nofile 600000
* hard nofile 600000
root soft nofile 600000
root hard nofile 600000
$ sudo vim /etc/pam.d/common-session
session required pam_limits.so
Hard limit ulimit -Hn
Soft limit ulimit -Sn
Max limit cat /proc/sys/fs/file-max