Red Hat Bugzilla – Bug 818702
Unable to set a user's shell limits in RHEL 5.8
Last modified: 2012-05-31 07:58:02 EDT
Description of problem:
I am hosting an oracle database on my RHEL 5.8 server. Oracle requires that specific shell limits be set for the oracle user.
To do so I:
a.) Added the following settings to /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
b.) Added the following line in the /etc/pam.d/login file
session required /lib64/security/pam_limits.so
But when the oracle user logs into the server, their shell limits do not reflect the above.
RHEL 5.8 box
[oracle@serverx ~]$ limit
memorylocked 32 kbytes
[oracle@serverx ~]$ limit descriptors 1025
limit: descriptors: Can't set limit
Linux serverx 2.6.18-238.12.1.el5 #1 SMP Sat May 7 20:18:50 EDT 2011 x86_64 x86_64 x86_64 GNU/Linux
The oracle user's shell limits need to be set in order for the oracle database to function normally.
Version-Release number of selected component (if applicable): N/A
I have reproduced the same error on two seperate RHEL 5 servers. The error does not occur on RHEL AS 3 and RHEL 6 servers.
Steps to Reproduce:
1. Edit /etc/security/limits.conf, /etc/pam.d/login and /etc/profile as described above.
2. Create a new ssh session for the oracle user (DO NOT su as root to oracle. You will not see the error)
3. view limits and attempt to change them
The incorrect limit descriptor is set for the user. Error "limit: descriptors: Can't set limit" is returned when attempting to increase the limit.
The oracle users's limits should match that in /etc/security/limits.conf
I cannot reproduce your problem.
While Red Hat welcomes bug reports on Red Hat products here in our
public bugzilla database, please keep in mind that bugzilla is not
a support tool or means of accessing support. If you would like
technical support please visit our support portal at
access.redhat.com or call us for information on subscription
offerings to suit your needs.