Skip to content

Instantly share code, notes, and snippets.

@yblee85
Created May 27, 2015 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yblee85/86ff339846a1930a2493 to your computer and use it in GitHub Desktop.
Save yblee85/86ff339846a1930a2493 to your computer and use it in GitHub Desktop.
Ubuntu, Increase number of max open files
edit /etc/security/limits.conf
# non-root users
* soft nofile 40000
* hard nofile 40000
# root users
root soft nofile 40000
root hard nofile 40000
edit /etc/pam.d/common-session and /etc/pam.d/common-session-noninteractive
add this line
session required pam_limits.so
@yblee85
Copy link
Author

yblee85 commented Dec 12, 2017

So I did vim /etc/pam.d/su and found:

//Sets up user limits, please uncomment and read /etc/security/limits.conf
//to enable this functionality.
//(Replaces the use of /etc/limits in old login)
session required pam_limits.so

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment