How To Increase the Open Files ulimit on Ubuntu

Add the following four lines to the bottom of /etc/security/limits.conf
:
root soft nofile 65535
root hard nofile 65535
* soft nofile 65535
* hard nofile 65535
NOTE: All whitespace MUST be a single tab!
Also edit these three files:
/etc/pam.d/su
/etc/pam.d/common-session
/etc/pam.d/common-session-noninteractive
and add the following one line:
session required pam_limits.so
Leave Your Comment
All fields marked with "*" are required.