LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
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 12-15-2003, 04:20 AM   #1
ipconfig
LQ Newbie
 
Registered: Nov 2003
Location: Israel
Distribution: RedHat
Posts: 9

Rep: Reputation: 0
Too many open files in system


Sometimes when I run bash scripts, it hangs for a long time, then outputs many errors starting at
/bin/bash: /bin/randomjoke: /bin/bash: bad interpreter: Too many open files in system
/bin/bash: cannot make pipes for command substitution: Too many open files in system
/bin/bash: cannot make pipes for command substitution: Too many open files in system
/bin/bash: cannot make pipes for command substitution: Too many open files in system
and then runs the script quite oddly.

What does Too many open files in system mean?
How can I make sure that doesn't happen?

I'm using RedHat 7.3.
 
Old 12-15-2003, 05:20 AM   #2
hw-tph
Senior Member
 
Registered: Sep 2003
Location: Sweden
Distribution: Debian
Posts: 3,032

Rep: Reputation: 58
It sounds like a program has spawned too many times. Check to see if you have tons and tons of some specific service or program loaded. I have had this happen to me, with Samba (and bad config files!) being the usual culprit. I just used killall smbd and killall nmbd and then the resources were freed up.


Håkan
 
Old 12-15-2003, 06:12 AM   #3
ipconfig
LQ Newbie
 
Registered: Nov 2003
Location: Israel
Distribution: RedHat
Posts: 9

Original Poster
Rep: Reputation: 0
Great, now I can't even ssh in. And that pc doesn't have a monitor and keyboard, so I'm going to have to reboot.
Is there a way to remove the limit for spawning processes, after I do that?
 
Old 12-15-2003, 07:59 AM   #4
MartinN
Member
 
Registered: Nov 2003
Location: Ronneby, Sweden
Posts: 555

Rep: Reputation: 30
You're on your own if you try this (I haven't done it) but the maximum number of open files is in the file
/proc/sys/fs/file-max
I believe that you could increase it by:
echo "65536" > /proc/sys/fs/file-max
Only root could do that, and it will not survive a reboot. Put it in one of the startup scripts if you want it to be persistent. But I'd say that it's just removing the symptoms of something else that's broken in your system.

Regards
Martin
 
Old 12-15-2003, 08:03 AM   #5
ipconfig
LQ Newbie
 
Registered: Nov 2003
Location: Israel
Distribution: RedHat
Posts: 9

Original Poster
Rep: Reputation: 0
What exactly is wrong?
Is it too many processes or too many io files open?
Or maybe it's something completely different?
Could I caude it to display a warning message when that number is near?
 
Old 12-16-2003, 05:14 AM   #6
ipconfig
LQ Newbie
 
Registered: Nov 2003
Location: Israel
Distribution: RedHat
Posts: 9

Original Poster
Rep: Reputation: 0
Could it be a bug in RedHat 7.3?
I get it in both my machines, both have the same things runnning except one has pppd and pppoe and the other has X. X, I noticed, starts about 30+ processes, while pppd and pppoe are two processes. Clearly, the X one has many more processees running.
Besides, file-max has 19659 in one of them, and I definitely don't have 19659 processes in any machine. It's 8192 in the other, that doesn't have over 50-100.
 
  


Reply



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
"Too many open files in system" neocookie Linux - General 2 08-27-2005 04:32 AM
Can Open Office open WordPerfect files hemenm Linux - Software 2 03-10-2004 05:14 PM
Reg Too Many Open Files in System Error manickaraja Linux - General 3 12-01-2003 05:34 AM
Too many open files in system jayakrishnan Linux - General 5 03-28-2003 09:58 PM
Too many open files on system error?! sarin Linux - General 4 07-23-2002 06:49 AM

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

All times are GMT -5. The time now is 05:22 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