Created
March 7, 2015 10:31
-
-
Save lsgrep/069e295c8a45a6d64bc7 to your computer and use it in GitHub Desktop.
http://stackoverflow.com/questions/21515463/how-to-increase-maximum-file-open-limit-ulimit-in-ubuntu
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
the ulimit command by default changes the HARD limits, which you (a user) can lower, but cannot raise. | |
Use the -S option to change the SOFT limit, which can range from 0-{HARD}. | |
I have actually aliased 'ulimit' to 'ulimit -S', so it defaults to the soft limits all the time. | |
alias ulimit='ulimit -S' | |
As for your issue, you're missing a column in your entries in limits.conf | |
There should be FOUR colums, the first is missing in your example. | |
* soft nofile 4096 | |
* hard nofile 4096 | |
The first column describes WHO the limit is to apply for. '*' is a wildcard, meaning all users. To raise the limits for root, you have to explicitly enter 'root' instead of '*'. | |
You also need to edit /etc/pam.d/common-session* and add the following line to the end: | |
session required pam_limits.so | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment