Solved

how to set  soft limit as unlimited for stacksize in linux

Posted on 2011-02-15
8
1,426 Views
Last Modified: 2013-12-15
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.

0
Comment
Question by:manean
  • 3
  • 2
  • 2
  • +1
8 Comments
 
LVL 68

Expert Comment

by:woolmilkporc
Comment Utility
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
0
 
LVL 68

Accepted Solution

by:
woolmilkporc earned 500 total points
Comment Utility
... and is there a /etc/security/limits.d/ directory? If so, what's in there?

Further, please try "-1" instead of "unlimited" in limits.conf. Some OS'es don't suppoert "unlimited".
Also remember that you'll have to set both hard and soft values in limits.conf.

wmp
0
 

Assisted Solution

by:manean
manean earned 0 total points
Comment Utility
Hi

there is no ulimit command in user profile.
after logging in i have set  " ulimit -s unlimited " and it's showing stack size as unlimited, but if open new session it's going to old setting.
i have set up value for both soft and hard limit, but hard limit only permenatly getting reflected but not
soft limit.

/etc/security/limits.d is empty.
0
 
LVL 14

Expert Comment

by:small_student
Comment Utility
Set it under user's home dir .bashrc file.

/home/username/.bashrc

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

0
How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

 
LVL 10

Expert Comment

by:Martin_J_Parker
Comment Utility
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
0
 

Author Comment

by:manean
Comment Utility
its working now.
0
 
LVL 10

Expert Comment

by:Martin_J_Parker
Comment Utility
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.
0
 

Author Closing Comment

by:manean
Comment Utility
Its working.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

​Being a Managed Services Provider (MSP) has presented you  with challenges in the past— and by meeting those challenges you’ve reaped the rewards of success.  In 2014, challenges and rewards remain; but as the Internet and business environment evol…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now