/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? |
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 |
Too many files ...
Thanks a lot, I'll try this ... :study:
|
As well as 'lsof', have a look at 'fuser' if your system has it.
|
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 |
All times are GMT -5. The time now is 04:19 PM. |