View previous topic :: View next topic |
Author |
Message |
aequitas Apprentice
Joined: 28 Aug 2002 Posts: 190 Location: Ooy bij arnhem
|
Posted: Thu Nov 10, 2005 10:45 pm Post subject: Too many open files (+/- 20.000) but lsof shows only +/-2000 |
|
|
I have a simple home server. Celeron 433.
This is a dump of my services:
Code: |
nfs [ started ]
ntp-client [ started ]
adsl [ started ]
dhcp [ started ]
slpd [ started ]
sshd [ started ]
local [ started ]
cupsd [ started ]
samba [ started ]
vixie-cron [ started ]
syslog-ng [ off ]
courier-imapd-ssl [ off ]
net.eth0 [ started ]
net.eth1 [ started ]
authdaemond [ started ]
rsyncd [ started ]
netmount [ started ]
webmin [ off ]
vsftpd [ started ]
xinetd [ started ]
apache2 [ started ]
spamd [ started ]
postfix [ off ]
iptables [ started ]
hdparm [ started ]
courier-imapd [ started ]
dnsmasq [ started ]
quota [ started ]
|
Now i get too many open file errors. Also in the kernel:
Code: | VFS: file-max limit 20000 reached |
Then i run lsof |wc -l it only shows about 1000-2000 files.
Where can i look to find the 18.000 other files that are opened?
This is realy bugging me. I have this problem for a month now. Sometimes its to worse and i have to access my machine local because ssh login is not possible.
I don't want to set the file limit any higher because i can't believe my system generates this many files.
I ran chkrootkit but did not see any suspicious things so that should be clean would it?
Can anyone help me?? _________________ I am not superstitious, that brings bad luck. |
|
Back to top |
|
|
JPMRaptor Guru
Joined: 04 Oct 2002 Posts: 410 Location: Maryland
|
Posted: Fri Nov 11, 2005 1:44 am Post subject: |
|
|
Is there anything that triggers the problem? Does it happen at boot? Does it repeat over time?
If you wait to get the error then do lsof you may not be seeing the problem. If the program that has the problem gets the error and then dies it will release all the files it has open. Try regularly checking the status with something like:
If you see the number starting to creep up then take a more detailed look at the lsof output to determine which process is causing problems. _________________ Underwater photo gallery
New pictures, Oct 2005 |
|
Back to top |
|
|
aequitas Apprentice
Joined: 28 Aug 2002 Posts: 190 Location: Ooy bij arnhem
|
Posted: Fri Nov 11, 2005 8:30 am Post subject: |
|
|
I can't seem to find any program that creates this many files connections.
Also the problem is that lsof does only show 1/10 of the files opened. So i can't find the problem with lsof.
Once i got an error while doing lsof |wc -l that the pipe could not be created because of to many files.
I rebooted the server yesterday because there was no solution i could find. I hope it was a temporalily problem and it doesn't come back. _________________ I am not superstitious, that brings bad luck. |
|
Back to top |
|
|
pjp Administrator
Joined: 16 Apr 2002 Posts: 20588
|
Posted: Fri Nov 11, 2005 5:05 pm Post subject: |
|
|
Google: linux "too many open files" 20000
open files /proc/sys/fs/file-max wrote: | From: Craig Kelley <ink@inconnu.isu.edu>
Subject: Re: too many open files
Date: Wed, 24 Apr 2002 10:01:15 -0700
References: <aa5uuo$50j$1@bt02e2.god.bel.alcatel.be>
In article <aa5uuo$50j$1@bt02e2.god.bel.alcatel.be>, Timpie wrote:
> Hello all,
>
> I recently installed a RedHat 7.0 (kernel 2.2.16-22) running sendmail 8.11.4
> for our internal mailrelaying.
> Once in a while I get the message too many open files in the mail log and
> messages file like following :
>
> messages.1:Apr 17 12:56:34 bt0g2p sendmail[574]: unable to dlopen
> /usr/lib/sasl/liblogin.so: /usr/lib/sasl/liblogin.so: cannot open shared
> object file: Too many open files in system.
[snip irrelevent ulimit stuff]
> So I tried augmenting the maximum by the following
>
> echo 4096 > /proc/sys/fs/file-max
>
> and it stopped appearing ... but I wonder if this is enough. I think I
> might need to recompile the kernel ?!!
No need to recompile the kernel. If you want that to be the default,
just put it in /etc/rc.d/rc.local, so that every time the system boots
the proc filesystem is updated. I have this on one of my 2.2 servers:
echo "65536" >/proc/sys/fs/file-max
(this machine can easily get over 20,000 open files with XDM serving
up KDE sessions) |
Bold emphasis mine. _________________ Quis separabit? Quo animo? |
|
Back to top |
|
|
|