Bug 157294 - Setting nproc variable in /etc/security/limits.conf has no effect
Setting nproc variable in /etc/security/limits.conf has no effect
Status: CLOSED DUPLICATE of bug 116133
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: pam (Show other bugs)
3.0
i686 Linux
medium Severity medium
: ---
: ---
Assigned To: Tomas Mraz
Jay Turner
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2005-05-10 06:11 EDT by Matteo Vescovi
Modified: 2015-01-07 19:09 EST (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2005-05-11 08:29:22 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Matteo Vescovi 2005-05-10 06:11:35 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.6) Gecko/20050406 Firefox/1.0.2 (Debian package 1.0.2-3)

Description of problem:
I edited the /etc/security/limits.conf file to change the hard limit and the soft limit of the nproc variable.
I added the lines:

*               soft    nproc           32000
*               hard    nproc           32000

and rebooted my box.
Issuing the command:

[me@box]$ ulimit -n 32000

generates the error message:

bash: ulimit: max user processes: cannot modify limit: Operation not permitted



Version-Release number of selected component (if applicable):
pam-0.75-62

How reproducible:
Always

Steps to Reproduce:
1.Edit /etc/security/limits.conf, adding or modifying the nproc lines so that they look like:

*               soft    nproc           32000
*               hard    nproc           32000

2.Issue the command `ulimit -n 32000' as a normal user

  

Actual Results:  bash: ulimit: max user processes: cannot modify limit: Operation not permitted

Expected Results:  No error message should have been generated and the nproc limit should have been raised to 32000.

Additional info:

I changed the file-max variable by adding the line
fs.file-max = 32768
to /etc/sysctl.conf, but that also seems to have no effect.

Am I missing something here?

Can the nproc hard limit be set to unlimited, or is the maximum value 32000 (as stated in the Knowledge Base Article ID: 5060 ?
Comment 1 Tomas Mraz 2005-05-10 07:08:38 EDT
This is confusing - you're mixing number of processes setting (nproc limit) and
maximum open files limit (nofile limit). I've set the limits as you wrote and
cannot reproduce the problem.
Comment 2 Matteo Vescovi 2005-05-10 11:28:58 EDT
My apologies.
Yes, the command should be `ulimit -u', not `ulimit -n'.

Step 2 should read:
Issue the command `ulimit -u 32000' as a normal user

Again, please pardon my oversight.

The problem still persists.
Comment 3 Tomas Mraz 2005-05-10 11:46:27 EDT
What 'ulimit -H -u' gives you in this situation?
Comment 4 Matteo Vescovi 2005-05-10 11:55:49 EDT
`ulimit -H -u' gives me 7168.

Same goes for `ulimit -S -u'
Comment 5 Tomas Mraz 2005-05-10 14:03:31 EDT
No surprise that it doesn't allow you ulimit -u 32000. How are you actually
accessing the machine? If by ssh then the reason is that the limits from
limits.conf aren't applied correctly by sshd if privilege separation is enabled.
This should be resolved by the next update release. You can try to disable
privilege separation in sshd meanwhile.
Comment 6 Matteo Vescovi 2005-05-11 08:27:58 EDT
The problem lies in the sshd privilege separation mechanism.

When logging in directly at the console (instead of logging in remotely with
ssh), the limits are correctly applied.
Comment 7 Matteo Vescovi 2005-05-11 08:29:22 EDT

*** This bug has been marked as a duplicate of 116133 ***

Note You need to log in before you can comment on or make changes to this bug.