ulimit values not being remembered (Ubuntu 11.10)


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu ulimit values not being remembered (Ubuntu 11.10)
# 1  
Old 02-15-2012
ulimit values not being remembered (Ubuntu 11.10)

Hey all, long time since I've been here.

I seem to be having some issues setting the ulimit value for the number of open files on Ubuntu 11.10 (it's an Amazon EC2 instance)

I followed the proccess outlined on this site, by editing /etc/security/limits.conf and adding
Code:
* hard nofile 16000
root hard nofile 16000

and editing /etc/pam.d/common-session and placed at the end of the file
Code:
session required pam_limits.so

When I rebooted the instance, all users still has the default 1024 for open files. I can manually change it but thats only for that terminal session.

Has anyone come across this before?

Thanks!
Primal

---------- Post updated 02-15-12 at 11:19 AM ---------- Previous update was 02-14-12 at 09:17 PM ----------

Figured it out, I cant just specify a hard limit, I need to set the soft limit as well (that's the value that appears in ulimit -a)
These 2 Users Gave Thanks to primal For This Post:
# 2  
Old 02-15-2012
From the bash man page, section on ulimit:

If neither -H nor -S is specified, both the soft and hard limits are set. The value of limit
can be a number in the unit specified for the resource or one of the special values hard,
soft, or unlimited, which stand for the current hard limit, the current soft limit, and no limit,
respectively. If limit is omitted, the current value of the soft limit of the resource is
printed, unless the -H option is given.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Linux

ulimit -n

Hi im a complete noob to shell commands but here is my problem i have a dedicated server i7 with 24 gig ram i have whm/cpanel on it now ive added a minecraft system to root but i cannot set the server to more than 512mb memory i was told its because the memory is being blocked and was told to... (7 Replies)
Discussion started by: gazzac
7 Replies

2. Solaris

ulimit

Hello, could you help me please? I write in command line: "ulimit 500" -> i've set the max size of 512-bytes blocks that i can write in one file. But when after it i use ulimit.3c in my program: "ulimit(UL_GETFSIZE);" the result turns out 1000. Why is it so? They always differ so that one is... (2 Replies)
Discussion started by: Zhenya_
2 Replies

3. UNIX for Dummies Questions & Answers

Alphabet and numeric values repeat again and again on HDD/Linux-Ubuntu

My system is Linux, Ubuntu. I examine my hard disk drive with a hex editor, it's unencrypted, and when I scroll down, using page down in the ASCII section at right showing the alphanumeric and symbols information, the letters of the alphabet repeat from A-Z along with numbers repeating, followed by... (2 Replies)
Discussion started by: totalrecallz
2 Replies

4. Solaris

ulimit

how do i check the ulimit set on my server.. ca i know whats the command ?? thanks in advance .. (5 Replies)
Discussion started by: expert
5 Replies

5. UNIX for Advanced & Expert Users

ulimit

hi what is the difference between file and data? if file is unlimited, does that mean we can have a file as big as we like? thanks. file(blocks) unlimited data(kbytes) 1048576 (6 Replies)
Discussion started by: JamesByars
6 Replies

6. Shell Programming and Scripting

RE error 41: No remembered search string.

I found when i run this code #! /bin/ksh error_log="/tmp/log3.txt" while read line ; do show=`grep "$line" $error_log|tail -1` case $line in "Finished") msg="VOLUME_MGR_ERROR" echo $line ... (1 Reply)
Discussion started by: unitipon
1 Replies

7. Solaris

ulimit

Hi, I need to increase the open files on my server to run a test. Usually what I do is: ulimit -n 5000 My questions are: 1] I want to set this parameter once and for all. What is the right parameter to set in /etc/system: rlim_fd_max or rlim_fd_cur? 2] How to make sure that this... (1 Reply)
Discussion started by: melanie_pfefer
1 Replies

8. Shell Programming and Scripting

grep: RE error 41: No remembered search string.

Hi guys, I am currently facing a problem with my current script, the script basically monitor a list of process on the Unix system. If a process is down it will send a notification e-mail to me. Currently I am facing an error when running the script grep: RE error 41: No remembered search... (2 Replies)
Discussion started by: fkaba81
2 Replies

9. UNIX for Dummies Questions & Answers

ulimit

Hi, system aix 4.3 when I execute umilit i get result "unlimited". why cant i ftp or extract from media filesize over 2gig.... e.g FS /test/testy is large file enabled. any help will be greatly appreciated. thnx (3 Replies)
Discussion started by: Student37
3 Replies

10. UNIX for Dummies Questions & Answers

ulimit -d

All I am trying to do ulimit -d unlimited and I get "sh: ulimit: The specified value exceeds the user's allowable limit." Can someone please help me understand, how to change this! Thanks (1 Reply)
Discussion started by: adadevil
1 Replies
Login or Register to Ask a Question