LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-18-2018, 03:03 AM   #1
sindh
LQ Newbie
 
Registered: Aug 2014
Posts: 28

Rep: Reputation: Disabled
How to increase limit for max number of open files (ulimit -n) on solaris 5 (SunOs5.10)


Hi, my process requires to open several files at a time(Any way I will close them once I am done with my job). But it is failing since the max limit is default to 256. I am planning to increase it to 2048.

I am providing the server details below -
Server - SunOS 5.10
User - steffen (I just need to increase the limit for user steffen)

My current limits -
core file size (blocks, -c) unlimited
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
open files (-n) 256
pipe size (512 bytes, -p) 10
stack size (kbytes, -s) 8192
cpu time (seconds, -t) unlimited
max user processes (-u) 29995
virtual memory (kbytes, -v) unlimited

I tried using below ways to overcome the issue -
- Manually tried setting the ulimit to 2048 (ulimit -n 2048)
- Tried adding it in the .profile
- Tried changing it using projecs(by Admin) as below -
1. projadd -K "process.max-file-descriptor=(basic,2048,deny)" proj.files
2. usermod -K "project=proj.files" steffen


After all this, I am still facing the issue.

I am attaching the same error log. Also, please let me know if I missed to add any other detail.
Please help me on how I can resolve this.
Attached Files
File Type: txt fd_error.txt (100.1 KB, 26 views)
 
Old 07-19-2018, 10:48 AM   #2
DavidMcCann
LQ Veteran
 
Registered: Jul 2006
Location: London
Distribution: PCLinuxOS, Salix
Posts: 6,155

Rep: Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318Reputation: 2318
As I understand it, you need to alter /etc/system with something like
Code:
set rlim_fd_max = 2048 # Hard limit for a single proc
set rlim_fd_cur = 2048 # Soft limit for a single proc
The command ulimit is Linux. I got this from
http://cb.vu/unixtoolbox.xhtml

If you have a Sun server running Solaris, shouldn't you have help available from the vendor? If you're still using the open-source version, you've had no security updates for the last 8 years!
 
1 members found this post helpful.
Old 07-20-2018, 05:46 AM   #3
sindh
LQ Newbie
 
Registered: Aug 2014
Posts: 28

Original Poster
Rep: Reputation: Disabled
Hi, Thanks for your response.

I didn't get a chance to try the mentod you mentioned. I tried another option that worked for me.

ulimit -n 2048
export LD_PRELOAD_32=/usr/lib/extendedFILE.so.1

I have added the above 2 lines in my .profile. And it worked. I am marking this thread as Solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Cannot set ulimit -l, says ulimit: max locked memory: cannot modify limit Xiano Slackware 1 07-24-2014 02:58 AM
ulimit: open files: cannot modify limit: Operation not permitted Winanjaya Linux - Server 3 02-20-2012 12:43 AM
How can I change the limit of 'Open Files' in ulimit? thomas2004ch Linux - Newbie 10 11-17-2009 05:21 AM
Setting ulimit to increase # of open files dieyouspammer Slackware 6 02-01-2006 02:42 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:25 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration