Bug 19663 - Too many open files in system
Summary: Too many open files in system
Status: CLOSED WORKSFORME
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: kernel   
(Show other bugs)
Version: 7.0
Hardware: i386 Linux
high
medium
Target Milestone: ---
Assignee: Michael K. Johnson
QA Contact: Brock Organ
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-10-24 02:31 UTC by Willy
Modified: 2007-03-27 03:36 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-12-15 02:50:48 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

Description Willy 2000-10-24 02:31:28 UTC
Hi, previously I was running Redhat 5.2 on our server and recently we have 
upgraded to Redhat 7.0 .  I have already applied all the patches available 
on Redhat's website.  However, I'm encountering the following error 
message after the system is running for about 2 days or more:

"Too many open files in system"

I suspect that Redhat 7 may not be closing unused files and thus resulting 
in too many open files.

What could be causing it?  I'm running the following applications on my 
system:

1) proftpd 1.2.0pre2
2) mysql 3.23.26-beta
3) qmail 1.03

Can anyone please provide some advice on how to fix this?

Thank you.

Comment 1 Daniel Roesen 2000-10-24 11:23:57 UTC
btw... ProFTPD 1.2.0pre2 has massive security holes. Upgrade to 1.2.0pre10 or 
current CVS code (best).

Comment 2 Willy 2000-10-25 01:52:43 UTC
Sorry, I'm actually running ProFTPD 1.2.0rc2

Thanks


Comment 3 Alan Cox 2000-10-27 16:23:11 UTC
I can think of a few things  here.

Firstly if you have registered for the Red Hat Network see the errata on this
and update the daemon in question as it has a file handle leak

Second time. Look in /proc/[0-9]*/fd and you'll see who has how many handles
open. A culprit will show up clearly enough. 

Finally you can increase the number of handles if needed (ie it really is using
that many) via the /proc/sys interface or with tools like powertweak


Comment 4 Willy 2000-10-31 03:03:45 UTC
Will the following increase the number of handles?

echo 32768 > /proc/sys/fs/file-max
echo 65536 > /proc/sys/fs/inode-max

Thank you.

Comment 5 Willy 2000-11-03 02:19:09 UTC
I've increased the file-max to 32768 and inode-max to 65536.  However I'm still 
encountering the "Too many open files in system error".  I've checked /proc/[0-
9]*/fd as you mentioned and found that alot of sockets are open in the 
directories.  Any idea what's the cause of this?

Below is a capture of a small part of the fd directory:

Thank you.

lrwx------    1 root     root           64 Nov  2 18:11 890 -> socket:[3020305]
lrwx------    1 root     root           64 Nov  2 18:11 891 -> socket:[3020963]
lrwx------    1 root     root           64 Nov  2 18:11 892 -> socket:[3020964]
lrwx------    1 root     root           64 Nov  2 18:11 893 -> socket:[3022862]
lrwx------    1 root     root           64 Nov  2 18:11 894 -> socket:[3022863]
lrwx------    1 root     root           64 Nov  2 18:11 895 -> socket:[3023181]
lrwx------    1 root     root           64 Nov  2 18:11 896 -> socket:[3023182]
lrwx------    1 root     root           64 Nov  2 18:11 897 -> socket:[3023584]
lrwx------    1 root     root           64 Nov  2 18:11 898 -> socket:[3023585]
lrwx------    1 root     root           64 Nov  2 18:11 899 -> socket:[3023962]
lrwx------    1 root     root           64 Nov  2 18:11 9 -> socket:[1040193]
lrwx------    1 root     root           64 Nov  2 18:11 90 -> socket:[1238633]

Comment 6 Alan Cox 2000-11-03 11:55:42 UTC
Which process has all the sockets (ie which directory is the one that is 
thousands of fds) and what process is that pid


Comment 7 Willy 2000-11-06 10:38:14 UTC
It's the Apache 1.3.14 server which I compiled with PHP 4.03pl1, modSSL 2.7.1-
1.3.14, OpenSSL 0.9.6

There are thousands of such sockets open for each Apache process.  Is this 
normal?  Any advice on how to fix this?

Thank you.

Comment 8 Alan Cox 2000-11-06 11:28:49 UTC
Each apache should not have thousands of sockets. That sounds like something in
your apache/php/ssl setup is leaking file descriptors. That would indicate an
error in the apache build or a bug in that apache configuration.



Comment 9 The Bogus One 2000-11-21 01:30:43 UTC
I think I'm experiencing the same result, don't know yet if it has the same
cause.  I'm running ProFTPD (CVS from a month or so ago), Apache 1.3.14-3, MySQL
3.23.24, and the Imap from RH.. This is basiaclly a stock RH 7 with updates. The
only addition is ProFTPD and XTRadius. The only update I saw that said anything
about file descriptions is up2date, which isn't even installed on the box in
question.. I'm having to reboot once a week or so. Get weird errors, and I can
tell they are file related. Reboot, and I'm good to go for a bit..  Looking at
lsof, I'm going to watch Apache.. It's the rpm out of RH updates...

Comment 10 Mike A. Harris 2002-02-11 13:22:17 UTC
Are these problems still occuring?


Note You need to log in before you can comment on or make changes to this bug.