1846602 Members
1630 Online
110256 Solutions
New Discussion

Re: ulimit problem

 
SOLVED
Go to solution
SSP_1
Regular Advisor

ulimit problem

Hi,

I am trying to change nofiles value through "ulimit -n" but it's giving me an error. I am using posix shell [/usr/bin/sh]. The error and the commands tried are as below :-

$ env | grep -i shell
SHELL=/usr/bin/sh
$ ulimit -a
time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 262144
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 512
$ ulimit -n 1025
su: ulimit: The specified value exceeds the user's allowable limit.
Obstacles exist to challenge you to keep going. Not to quit.
2 REPLIES 2
RikTytgat
Honored Contributor
Solution

Re: ulimit problem

Hi,

ulimit has 2 kinds of limits: soft and hard.

A user can only increase its soft limit up to the hard limit.

Use ulimit -Ha
ulimit -Sa

If, for the nofiles, your hard limit < 1025, then that is te reason for the error.

For your particular case, increasing the kernel parameter maxfiles to 2048 (this is the maximum), should make the command ulimit -n 1025 work.


Hope this helps,
Rik
U.SivaKumar_2
Honored Contributor

Re: ulimit problem

Hi,
A hard limit had been imposed in the system globally by the kernel paramter maxssiz which
defines the maximum stack size. That is the one which prevents you do that ulimit task.

regards,
U.Sivakumar
Innovations are made when conventions are broken