open files: cannot modify limit: (ulimit -n) error



I have an Itanium based system running Red Hat Enterprise Linux AS release
4 (Nahant Update 1).

The contents of /proc/sys/fs/file-max is: 1660043

The contents of /etc/security/limits.conf contain:

oracle soft nproc 2047
oracle hard nproc 16384
oracle soft nofile 1024
oracle hard nofile 65536
oracle soft stack 1024
oracle hard stack 32768

The contents of /etc/pam.d/sshd :

#%PAM-1.0
auth required pam_stack.so service=system-auth
auth required pam_nologin.so
account required pam_access.so
account required pam_stack.so service=system-auth
password required pam_stack.so service=system-auth
session required pam_stack.so service=system-auth
session required pam_limits.so
session optional pam_console.so

If I `sudo su - oracle' and then type:

ulimit -n 65536

I get the following error returned:

-bash: ulimit: open files: cannot modify limit: Operation not permitted

On the other hand, if I am root, and then `su - oracle' and then type
`ulimit -n 65536' the error is not generated, and the open files limit is
set to 65536 as can be seen from the output from `ulimit -a'.

I know the bash man page states the following for the -n switch for ulimit:

-n The maximum number of open file descriptors (most systems do not allow
this value to be set)

Although this may be true, you can see that I was able to use the -n
switch and change the open files from its default value of 1024 to the
hard limit of 65536 set in the limits.conf file.

I have googled and have seen a few posts dealing with this similar issue,
but I have not seen a solution or explanation for the problem.

Does anyone know what is causing this error and how to fix it?

Thanks.
Scott
--

--
redhat-list mailing list
unsubscribe mailto:redhat-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/redhat-list



Relevant Pages

  • open files: cannot modify limit: (ulimit -n) error
    ... `ulimit -n 65536' the error is not generated, and the open files limit ... switch and change the open files from its default value of 1024 to the ...
    (linux.redhat)
  • how to change ulimit open files
    ... try setting your ulimit as root to some value (let's say the limit is 1024 ... You won't be able to set it to a value which is greater than the hard limit. ... how to change ulimit open files ... I want to modify some value on output of ulimit -a for user oracle: ...
    (SunManagers)
  • Re: permanet file descriptor limit
    ... Is there any difference between the o/p returned from 'ulimit' when you ... Marco wrote: ... * soft nofile 1024 ... I want to change permanently the number of open files my system can ...
    (comp.os.linux.misc)
  • Questions about /etc/profile ulimit -Hn and /etc/initscript & /etc/security/limits
    ... When running java w/ another program I get this error message- ... java.io.IOException: Too many open files ... 2)create /etc/initscript as described in man initscript, ... "ulimit -Hn 65536" anywhere in that file?? ...
    (Debian-User)
  • Re: Saving "complete desktop"
    ... I use Matlab 7.2.0.232 on Windows. ... Is there a way to make Matlab save the list of current open files ... 1,2,3, and choosing "Project B" will open files 2,4,5. ...
    (comp.soft-sys.matlab)