Link to home
Create AccountLog in
Avatar of manean
maneanFlag for India

asked on

how to set soft limit as unlimited for stacksize in linux

i want to set stack size limit to unlimited for soft limit for particular user on RHEL5.3

i set to hard limit to unlimited and it's showing if i give ulimit -Hs but if i set unlimited or any other value for soft limit in /etc/security/limits.conf it's not getting reflected.
i closed the session and re-opened it also.

Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Hi,

could it be that there is a ulimit command in the user's .profile resetting the limit to the old value?

What is the immediate effect of "ulimit -Ss unlimted"? Check with "ulimit -Ss"!

wmp
ASKER CERTIFIED SOLUTION
Avatar of woolmilkporc
woolmilkporc
Flag of Germany image

Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
SOLUTION
Link to home
membership
Create an account to see this answer
Signing up is free. No credit card required.
Create Account
Set it under user's home dir .bashrc file.

/home/username/.bashrc

This will enable the ulimit in both logon and nologon Terminals.

What have you actually got in the /etc/security/limits.conf file?

You need 2 lines in there as follows:
* soft core unlimited
* hard core unlimited
Avatar of manean

ASKER

its working now.
Glad to hear it's working but please do tell us what the solution was. It may benefit others with the same problem in the future.
Avatar of manean

ASKER

Its working.