nofile ulimit -n on Ubuntu 14.04 LTS
➜ sudo sysctl -a|grep file
fs.file-max = 2037581
fs.file-nr = 2784 0 2037581
➜ ~ cat /proc/sys/fs/file-max
2037581
➜ ~ cat /proc/sys/fs/file-nr
2720 0 2037581
/etc/security/limits.conf
* hard nofile 2037581
* soft nofile 2037581
root hard nofile 2037581
root soft nofile 2037581
/etc/pam.d/su
session required pam_limits.so
/etc/pam.d/common-session
session required pam_limits.so
then reboot.
but ulimit -n got 1024 again.
only can ulimit -n 4096 as max value
or got error
ulimit: value exceeds hard limit
14.04 ulimit
add a comment |
➜ sudo sysctl -a|grep file
fs.file-max = 2037581
fs.file-nr = 2784 0 2037581
➜ ~ cat /proc/sys/fs/file-max
2037581
➜ ~ cat /proc/sys/fs/file-nr
2720 0 2037581
/etc/security/limits.conf
* hard nofile 2037581
* soft nofile 2037581
root hard nofile 2037581
root soft nofile 2037581
/etc/pam.d/su
session required pam_limits.so
/etc/pam.d/common-session
session required pam_limits.so
then reboot.
but ulimit -n got 1024 again.
only can ulimit -n 4096 as max value
or got error
ulimit: value exceeds hard limit
14.04 ulimit
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32
add a comment |
➜ sudo sysctl -a|grep file
fs.file-max = 2037581
fs.file-nr = 2784 0 2037581
➜ ~ cat /proc/sys/fs/file-max
2037581
➜ ~ cat /proc/sys/fs/file-nr
2720 0 2037581
/etc/security/limits.conf
* hard nofile 2037581
* soft nofile 2037581
root hard nofile 2037581
root soft nofile 2037581
/etc/pam.d/su
session required pam_limits.so
/etc/pam.d/common-session
session required pam_limits.so
then reboot.
but ulimit -n got 1024 again.
only can ulimit -n 4096 as max value
or got error
ulimit: value exceeds hard limit
14.04 ulimit
➜ sudo sysctl -a|grep file
fs.file-max = 2037581
fs.file-nr = 2784 0 2037581
➜ ~ cat /proc/sys/fs/file-max
2037581
➜ ~ cat /proc/sys/fs/file-nr
2720 0 2037581
/etc/security/limits.conf
* hard nofile 2037581
* soft nofile 2037581
root hard nofile 2037581
root soft nofile 2037581
/etc/pam.d/su
session required pam_limits.so
/etc/pam.d/common-session
session required pam_limits.so
then reboot.
but ulimit -n got 1024 again.
only can ulimit -n 4096 as max value
or got error
ulimit: value exceeds hard limit
14.04 ulimit
14.04 ulimit
asked May 7 '14 at 6:14
sharewindsharewind
131112
131112
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32
add a comment |
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32
add a comment |
2 Answers
2
active
oldest
votes
If u set root hard nofile 65535
it will only change root users limit.
If you want to change another users limit add that users username for example,
sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.
1
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
add a comment |
I found that if the service is launched under an upstart init script you must use the stanza limit to control this!
See: http://bryanmarty.com/2012/02/10/setting-nofile-limit-upstart/
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f462112%2fnofile-ulimit-n-on-ubuntu-14-04-lts%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
If u set root hard nofile 65535
it will only change root users limit.
If you want to change another users limit add that users username for example,
sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.
1
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
add a comment |
If u set root hard nofile 65535
it will only change root users limit.
If you want to change another users limit add that users username for example,
sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.
1
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
add a comment |
If u set root hard nofile 65535
it will only change root users limit.
If you want to change another users limit add that users username for example,
sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.
If u set root hard nofile 65535
it will only change root users limit.
If you want to change another users limit add that users username for example,
sharewind hard nofile 65535
Or add * for username which will change all users limit. But it is not recommended.
answered May 7 '14 at 6:33
Manula WaidyanathaManula Waidyanatha
6,07711619
6,07711619
1
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
add a comment |
1
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
1
1
It doesn't work
– sharewind
May 8 '14 at 1:54
It doesn't work
– sharewind
May 8 '14 at 1:54
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
Did you change both soft and hard file limits. If not add the soft file limit too. I used hard limit only as an example
– Manula Waidyanatha
May 11 '14 at 9:17
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
I have the same experience as @ManulaWaidyanatha
– Jeune
Jan 27 '15 at 7:47
add a comment |
I found that if the service is launched under an upstart init script you must use the stanza limit to control this!
See: http://bryanmarty.com/2012/02/10/setting-nofile-limit-upstart/
add a comment |
I found that if the service is launched under an upstart init script you must use the stanza limit to control this!
See: http://bryanmarty.com/2012/02/10/setting-nofile-limit-upstart/
add a comment |
I found that if the service is launched under an upstart init script you must use the stanza limit to control this!
See: http://bryanmarty.com/2012/02/10/setting-nofile-limit-upstart/
I found that if the service is launched under an upstart init script you must use the stanza limit to control this!
See: http://bryanmarty.com/2012/02/10/setting-nofile-limit-upstart/
answered Feb 8 '18 at 0:29
Richard MauriRichard Mauri
1
1
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f462112%2fnofile-ulimit-n-on-ubuntu-14-04-lts%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you try setting a minimally changed limit instead?
– Josip Rodin
Jul 9 '16 at 22:32