LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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 06-20-2005, 06:55 AM   #1
ThePreacherMan
LQ Newbie
 
Registered: May 2004
Location: Germany/NRW
Distribution: Suse 8.0, 9.0
Posts: 6

Rep: Reputation: 0
/var/log/messages: Too many files open


Hi @All,

I have problems with my Linux (SuSE 9.0 Pro) - in /var/log/messages I have many messages containing "Too many files open" - this is also an error of squid. Squid doesn't open a new Webpage, getting the message "Too many ..."

Does anyone knows a solution for this problem?
 
Old 06-21-2005, 12:40 AM   #2
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
Decrease /proc/sys/net/ipv4/tcp_fin_timeout?

The first thing you need to do is try to find out which process(es) are opening all the file handles. Is it squid? Or is squid the victim of some other process eating up resources? Your /var/log/messages file is a good place to start looking. "Lsof" can also be useful.

Once you've identified the culprit, then you need to find out what *kind* of file handles the process is eating up: disk files? threads? sockets? ("sockets" is a good guess).

Then you need to figure out what to do about it. Perhaps (depending on the resource), you can increase some operating-system limit. But more likely, you'll probably find some kind of configuration error relating to that process itself.

Assuming the culprit is "squid", and that the problem is open sockets - you might wish to decrease your TCP/IP stack's TIME_WAIT value:

/proc/sys/net/ipv4/tcp_fin_timeout

Hope that helps .. PSM

Last edited by paulsm4; 06-21-2005 at 12:49 AM.
 
Old 06-21-2005, 01:55 AM   #3
ThePreacherMan
LQ Newbie
 
Registered: May 2004
Location: Germany/NRW
Distribution: Suse 8.0, 9.0
Posts: 6

Original Poster
Rep: Reputation: 0
Too many files ...

Thanks a lot, I'll try this ...
 
Old 06-21-2005, 02:47 AM   #4
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,356

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
As well as 'lsof', have a look at 'fuser' if your system has it.
 
Old 06-21-2005, 02:58 PM   #5
paulsm4
LQ Guru
 
Registered: Mar 2004
Distribution: SusE 8.2
Posts: 5,863
Blog Entries: 1

Rep: Reputation: Disabled
You might also increase port range

Hi -

Along with reducing TIME_WAIT (which reduces the time TCP/IP will wait before recycling an "ephemeral port" number, thus increasing the rate at which squid can create new connections), you might also want to:

a) increase the ephemeral port range
EXAMPLE:
echo 1024 32768 > /proc/sys/net/ipv4/ip_local_port_range


b) Modify your squid startup script to increase the #/permitted file descriptors:
EXAMPLE:
ulimit -HSn 8192

You can "google" either of these parameters for more information.

Your .. PSM
 
  


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
what does messages suppressed in /var/log/messages mean saavik Linux - Networking 2 05-07-2008 02:31 PM
Redirecting the kernel messages to file other than /var/log/messages jyotika_b83 Linux - General 3 04-28-2005 06:39 PM
Deleted /var/log/messages, can't log any files-iptables chingyenccy Linux - Newbie 7 02-27-2005 04:03 PM
From where am i getting error messages to /var/log/messages? prabhuacsp Linux - Networking 1 02-16-2005 12:34 AM
/var/log/messages full of these messages. Should I be concerned? mdavis Linux - Security 5 04-16-2004 10:08 AM

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

All times are GMT -5. The time now is 11:13 PM.

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