Too many open files in system

FreeBSD, Gentoo, openSUSE, CentOS, Ubuntu, Debian
r00ty
Posts: 747
Joined: 2003-03-17 15:32
 

Too many open files in system

Post by r00ty »

Hallo Leute !
Heute morgen konnte ich nicht meine Mails abrufen und als ich mich per ssh einloggen wollte kam ne Fehlermeldung, dass zu viele Dateien offen sind und schwupps war die Shell weg.
/var/log/warn

Code: Select all

May  3 04:21:56 z-o-n-e master[1039]: couldn't exec /usr/lib/cyrus/bin/imapd: Too many open files in system
May  3 04:21:56 z-o-n-e master[1199]: service imap pid 1039 in READY state: terminated abnormally
May  3 04:21:56 z-o-n-e master[1040]: couldn't exec /usr/lib/cyrus/bin/imapd: Too many open files in system
May  3 04:21:56 z-o-n-e master[1199]: service imap pid 1040 in READY state: terminated abnormally
May  3 04:21:56 z-o-n-e master[1041]: couldn't exec /usr/lib/cyrus/bin/imapd: Too many open files in system
May  3 04:21:56 z-o-n-e master[1199]: service imap pid 1041 in READY state: terminated abnormally
May  3 04:21:56 z-o-n-e master[1042]: couldn't exec /usr/lib/cyrus/bin/imapd: Too many open files in system
May  3 04:21:56 z-o-n-e master[1199]: service imap pid 1042 in READY state: terminated abnormally
/var/log/warn

Code: Select all

May  3 04:52:34 z-o-n-e postfix/proxymap[1712]: fatal: accept connection: Too many open files in system
May  3 04:52:34 z-o-n-e postfix/pickup[1713]: fatal: scan_dir_push: open directory maildrop: Too many open files in system
May  3 04:52:35 z-o-n-e postfix/master[1903]: warning: process /usr/lib/postfix/proxymap pid 1712 exit status 1
May  3 04:52:35 z-o-n-e postfix/master[1903]: warning: /usr/lib/postfix/proxymap: bad command startup -- throttling
May  3 04:52:35 z-o-n-e postfix/master[1903]: warning: process /usr/lib/postfix/pickup pid 1713 exit status 1
May  3 04:52:35 z-o-n-e postfix/master[1903]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
May  3 04:53:38 z-o-n-e postfix/smtpd[1543]: warning: premature end-of-input on private/proxymap socket while reading input attribute name
May  3 04:53:38 z-o-n-e postfix/smtpd[1543]: warning: private/proxymap socket: service dict_proxy_open: Connection reset by peer
May  3 04:53:38 z-o-n-e postfix/proxymap[1762]: fatal: accept connection: Too many open files in system
May  3 04:53:38 z-o-n-e postfix/pickup[1761]: fatal: scan_dir_push: open directory maildrop: Too many open files in system
May  3 04:53:39 z-o-n-e postfix/master[1903]: warning: process /usr/lib/postfix/proxymap pid 1762 exit status 1
May  3 04:53:39 z-o-n-e postfix/master[1903]: warning: /usr/lib/postfix/proxymap: bad command startup -- throttling
May  3 04:53:39 z-o-n-e postfix/master[1903]: warning: process /usr/lib/postfix/pickup pid 1761 exit status 1
May  3 04:53:39 z-o-n-e postfix/master[1903]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
/var/log/messages

Code: Select all

May  3 04:22:01 z-o-n-e master[1199]: process 2718 exited, status 71
May  3 06:22:01 z-o-n-e kernel: VFS: file-max limit 50917 reached
May  3 06:22:01 z-o-n-e last message repeated 2 times
May  3 04:22:01 z-o-n-e master[1199]: service imap pid 2718 in READY state: terminated abnormally
May  3 06:22:01 z-o-n-e kernel: VFS: file-max limit 50917 reached
May  3 06:22:01 z-o-n-e last message repeated 2 times
gut, meine Frage ist natürlich wie ich das verhindern kann, dass sowas nochmal passiert. Wie bekomm ich denn raus wieviele und was für Files offen sind ? Sonst irgendwelche Tipps für mich ?

ps: ich verdächtige ein Perlscript von mir, das die Probleme verursachen könnte....
chris76
Posts: 1878
Joined: 2003-06-27 14:37
Location: Germering
 

Re: Too many open files in system

Post by chris76 »

r00ty wrote:Wie bekomm ich denn raus wieviele und was für Files offen sind ?

Code: Select all

man lsof
Gruß Christian

BofH excuses: YOU HAVE AN I/O ERROR -> Incompetent Operator error
sfeni
Posts: 341
Joined: 2002-08-15 11:35
Location: Schwabenland
 

Re: Too many open files in system

Post by sfeni »

hi,
habe genau das gleich problem mit meiner kiste.
bisher habe ich einfach den server rebootet und dann ist wieder alles in butter :)
leider finde ich für lsof nicht die passende option, dass er mir nur die files anzeigt.

kann mir hier jemand was passendes geben?
chris76
Posts: 1878
Joined: 2003-06-27 14:37
Location: Germering
 

Re: Too many open files in system

Post by chris76 »

[ ] Du hast die Manpage gelesen.
Gruß Christian

BofH excuses: YOU HAVE AN I/O ERROR -> Incompetent Operator error
sfeni
Posts: 341
Joined: 2002-08-15 11:35
Location: Schwabenland
 

Re: Too many open files in system

Post by sfeni »

[X] Du hast die Manpage gelesen.

P.S.: "lsof -o" ist es nicht :(
thorsten
Posts: 561
Joined: 2003-02-01 13:14
Location: Fuldatal
 

Re: Too many open files in system

Post by thorsten »

Um sowas im Vorfeld zu erkennen, empfehle ich munin/munin-node mit den ganzen möglichen plugins hat man den perfekten Ã?berblick über den Status des Servers. - Ich liebe das tool 8)
sfeni
Posts: 341
Joined: 2002-08-15 11:35
Location: Schwabenland
 

Re: Too many open files in system

Post by sfeni »

gibts da auch was für nagios? nagios rennt da drauf schon.