Solved

how to set  soft limit as unlimited for stacksize in linux

Posted on 2011-02-15
8
1,455 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
ID: 34904392
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
ID: 34904421
... 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
ID: 34904554
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
ID: 34904799
Set it under user's home dir .bashrc file.

/home/username/.bashrc

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

0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 35213830
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
ID: 35868347
its working now.
0
 
LVL 10

Expert Comment

by:Martin_J_Parker
ID: 35877146
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
ID: 35892817
Its working.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Anti-Spam SMTP Proxy Server (@SSP) 7 82
LINUX, CPANEL & WHM 5 44
Trying to make SNMP connection work 7 65
Linux Scripting 3 97
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
You ever wonder how to backup Linux system files just like Windows System Restore?  Well you can use Timeshift in Linux to perform those similar action.  This tutorial will show you how to backup your system files and keep regular intervals. Note…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
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…

914 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

16 Experts available now in Live!

Get 1:1 Help Now