Can't solve the "Too many open files" error


 
Thread Tools Search this Thread
Operating Systems Solaris Can't solve the "Too many open files" error
# 1  
Old 05-10-2013
Can't solve the "Too many open files" error

I keep getting "Too many open files" in /var/adm/messages that I do not know how to fix.

I've searched for solution on this forum and have increased the file descriptors limit but the problem persists.

The problem is happening in a solaris zone....


Code:
/var/adm/messages log example

May 10 12:31:08 app.server.com procname[3962]: [ID 702911 local0.error] [1] Cannot open destination 'xyz.tmp' [Too many open files]


Code:
plimit 3962
3962:   procname
   resource              current         maximum
  time(seconds)         unlimited       unlimited
  file(blocks)          unlimited       unlimited
  data(kbytes)          unlimited       unlimited
  stack(kbytes)         8192            unlimited
  coredump(blocks)      unlimited       unlimited
  nofiles(descriptors)  3072            3072
  vmemory(kbytes)       unlimited       unlimited

Code:
pfiles 3962
.....
265 entries

Code:
ulimit -n -H
3072

Code:
ulimit -n -S
3072

Code:
Running a shell script that goes through /proc and runs pfiles on all the processes on the zone... 
Shows that it opened 2746 files... well below the limit.

Code:
Running the same script on the global zones....
shows 7522 files open (I'm guessing all zones + global)

Code:
global....

ulimit -n -H
65536

ulimit -n -S
256

---------- Post updated at 03:16 PM ---------- Previous update was at 03:14 PM ----------

Another thread mentioned that maybe it's a "too many concurrent open files"...

Code:
global...

# getconf OPEN_MAX
256


the problematic zone...

# getconf OPEN_MAX
3072

Code:
global

# echo "maxusers/D" | adb -k
physmem 1fe90d
maxusers:
maxusers:       2048


and I cant seems to run this on the zone...


Last edited by JT-KGY; 05-10-2013 at 06:05 PM..
# 2  
Old 05-10-2013
Perhaps the script in question could be reworked to not open so many concurrent files?
# 3  
Old 05-10-2013
The point is that the script in question (with proc id: 3962)... opened only 265 files... well
below the limit that I set.. Smilie
# 4  
Old 05-10-2013
And if you can't get it working one way perhaps you can get it working another... Why does your script open so many simultaneous files?
# 5  
Old 05-10-2013
Quote:
Originally Posted by Corona688
And if you can't get it working one way perhaps you can get it working another... Why does your script open so many simultaneous files?
It's a binary executable that I do not have insight on how it works... Smilie
# 6  
Old 05-10-2013
This is a non-global zone, correct? Are you using resource management in that zone? Maybe process.max-file-descriptor is set too low.
# 7  
Old 05-10-2013
Quote:
Originally Posted by fpmurphy
This is a non-global zone, correct? Are you using resource management in that zone? Maybe process.max-file-descriptor is set too low.
I'm not using the resource management but.. here's the output for prctl....

Code:
ran from global zone....

# prctl -n process.max-file-descriptor 27160
process: 27160: procname
NAME    PRIVILEGE       VALUE    FLAG   ACTION                       RECIPIENT
process.max-file-descriptor
        privileged      3.07K       -   deny                                 -
        system          2.15G     max   deny                                 -

process 27160 is similar to the problematic process posted earlier.. running in a zone.

---------- Post updated at 07:29 PM ---------- Previous update was at 07:28 PM ----------

it is privileged to 3.07k... matches the ulimit reading right?
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Expect: spawn id exp5 not open while executing "expect "$" { send "sudo su -\r" }"

Hi All, i am trying to ssh to a remote machine and execute certain command to remote machine through script. i am able to ssh but after its getting hung at the promt and after pressing ctrl +d i am gettin the out put as expect: spawn id exp5 not open while executing "expect "$" {... (3 Replies)
Discussion started by: Siddharth shivh
3 Replies

2. Shell Programming and Scripting

Delete all log files older than 10 day and whose first string of the first line is "MSH" or "<?xml"

Dear Ladies & Gents, I have a requirement to delete all the log files in /var/log/test directory that are older than 10 days and their first line begin with "MSH" or "<?xml" or "FHS". I've put together the following BASH script, but it's erroring out: for filename in $(find /var/log/test... (2 Replies)
Discussion started by: Hiroshi
2 Replies

3. Solaris

How to solve M5000 CPU "Deconfigured" state?

Hi Community, i have one M5000 spare machine which was handled by support team. they told me that it is gone completely . i have checked the status. before it was showing MBU_B degraded. i updated to latest firmware and , resetted the xscf and now this is showing as normal. MBU_B... (5 Replies)
Discussion started by: bentech4u
5 Replies

4. UNIX for Advanced & Expert Users

Help with UNIX "File Open" Error

We have a script that runs and picks up some files to later be used in Oracle. Every now and again we get a ERROR 'filename' file is open We know for a fact the files are not open. The files are created early morning and not used until the next morning by the script. If we manually open the file... (7 Replies)
Discussion started by: randybrazil
7 Replies

5. Solaris

"Can't open boot device" error !!

I've a Sun V440 machine, and it's running solaris 10 .. for some reason i need to install a fresh copy of solaris 10. for that i've prepared solaris 10 dvd but surprisingly i found there is no any dvd rom on this machine, so i've took a dvd rom from a V240 machine and inserted on V440. after... (3 Replies)
Discussion started by: Anti_Evil
3 Replies

6. Shell Programming and Scripting

awk command to replace ";" with "|" and ""|" at diferent places in line of file

Hi, I have line in input file as below: 3G_CENTRAL;INDONESIA_(M)_TELKOMSEL;SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL My expected output for line in the file must be : "1-Radon1-cMOC_deg"|"LDIndex"|"3G_CENTRAL|INDONESIA_(M)_TELKOMSEL"|LAST|"SPECIAL_WORLD_GRP_7_FA_2_TELKOMSEL" Can someone... (7 Replies)
Discussion started by: shis100
7 Replies

7. Solaris

Find all "regular" files open for write on solaris?

How do I find all "regular" files on solaris(8) that are open for write ( +read as well). I tried using pfiles, and lsof commands, but not sure how to get exactly what I wanted. ps -e | awk '{ print $1 }' | xargs -i pfiles {} 2>/dev/null (10 Replies)
Discussion started by: kchinnam
10 Replies

8. Shell Programming and Scripting

"Join" or "Merge" more than 2 files into single output based on common key (column)

Hi All, I have working (Perl) code to combine 2 input files into a single output file using the join function that works to a point, but has the following limitations: 1. I am restrained to 2 input files only. 2. Only the "matched" fields are written out to the "matched" output file and... (1 Reply)
Discussion started by: Katabatic
1 Replies

9. IP Networking

Unknown open port: "6881/tcp open bittorrent-tracker" found with nmap

Hi. I ran nmap on my server, and I get the following: Starting Nmap 4.76 ( http://nmap.org ) at 2009-03-19 16:33 EDT Interesting ports on -------- (-----): Not shown: 997 closed ports PORT STATE SERVICE 22/tcp open ssh 80/tcp open http 6881/tcp open bittorrent-tracker The... (0 Replies)
Discussion started by: Rledley
0 Replies

10. SuSE

VMDB Failure" followed by "Unable to open snapshot file"

keep getting an error when I try to revert to a snapshot: "VMDB Failure" followed by "Unable to open snapshot file" Im using vmware server 1.0.4, host OS is windows xp and guest OS is SLES. Is there anything I can do to recover the snapshot or am I in trouble!?!?! (0 Replies)
Discussion started by: s_linux
0 Replies
Login or Register to Ask a Question