System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

Ulimit setting error for non-root user

deepakb977
Occasional Contributor

Ulimit setting error for non-root user

Hello,

 

I have problem to set ulimit stack for non root user. below is the error shown:

time(seconds) unlimited
file(blocks) unlimited
data(kbytes) 4194300
stack(kbytes) 8192
memory(kbytes) unlimited
coredump(blocks) 4194303
nofiles(descriptors) 4000
>ulimit -Hs 12000
su: ulimit: The specified value exceeds the user's allowable limit.

But for root user I can do it.

 

Thanks,

 

3 REPLIES
Dennis Handly
Acclaimed Contributor

Re: ulimit setting error for non-root user

This is as designed, only root can increase a value past the hard limit.

To increase it, you must change the kernel parm maxssiz.

deepakb977
Occasional Contributor

Re: ulimit setting error for non-root user

Hello Dennis,



Thanks for the reply. Yes, I can change for root user but I cannot change
for the other user.

Below are the kernel parameter value:

maxssiz 8388608 8388608 Immed

maxssiz_64bit 268435456 268435456 Immed

pa_maxssiz_32bit 83648512 Default Immed

pa_maxssiz_64bit 536870912 Default Immed



maxdsiz 1073741824 1073741824 Immed

maxdsiz_64bit 4294967296 4294967296 Immed



below is the value for normal user now:

$ ulimit -a

time(seconds) unlimited

file(blocks) unlimited

data(kbytes) 1048576

stack(kbytes) 8192

memory(kbytes) unlimited

coredump(blocks) 4194303

nofiles(descriptors) 65535

$ ulimit -s 8193

sh: ulimit: A specified flag is not valid for this command.

$

As per setting in kernel parameter value, it should be able to increase the
value but it doesn't. Is this need patch need to apply.



Thanks,

Deepak
Dennis Handly
Acclaimed Contributor

Re: ulimit setting error for non-root user

> As per setting in kernel parameter value, it should be able to increase the value but it doesn't.

 

Have you changed maxssiz?  (Your non-root sessions will have to logout.)  Some links with more discussion:

https://community.hpe.com/t5/System-Administration/ulimit-and-maxssiz/m-p/4553461

https://community.hpe.com/t5/System-Administration/MAXSSIZ/m-p/2674302

https://community.hpe.com/t5/System-Administration/How-to-increase-stack-size/m-p/5849291