I’m trying to increase the hard and soft limits for the oracle user by
specifying them in /etc/security/limits.conf
oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 4096
oracle hard nofile 65536
oracle soft stack 10240
All the limits are being applied correctly except the nofile limits.
If I log in as that user, either with a new session or “su - oracle”
the nofile limit is 1024 and can’t be adjusted any higher. However, if I
just “su oracle” from the root user the nofile limits are what is
specified in the file.
From what I can gather I need to have the “session require
pam_limits.so” specified in /etc/pam.d/login but as far as I can tell it
is included via the “session include common-session” line.
Any one else have this problem or know of a solution?
Are you sure there is not something in the ‘oracle’ user’s profile or
login scripts resetting it again to some smaller value? The difference
between ‘su’ on its own and the options that fail as you described them
is that the other options reset the environment completely where ‘su’ on
its own does not so you are actually inheriting the previous user’s
settings (and the previous user may not have any bash/profile scripts
setting things down to 1024).
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
The -H and -S flags specify whether the hard limit or the
soft limit for the given resource is set. A hard limit can-
not be increased once it is set. A soft limit can be
increased up to the value of the hard limit. If neither the
-H or -S options is specified, the limit applies to both.
That would explain why I can’t change the hard limit after it’s been
set.
Yes, you understand it correctly. The problem is that Oracle apparently
does not understand and instead of setting a soft limit (which you could
then control as you tried to do) they set a hard limit, with the
‘oracle’ user, thus locking you out from making your own changes after
the fact. Silly, but oh well.
Good luck.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.15 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/