Re: too many open files, die Zweite
Hallo, Friedemann Schorer [EMAIL PROTECTED]: vs2066134:~# cat /proc/sys/fs/file-max 262144 vs2066134:~# lsof | grep -c / 1411 vs2066134:~# lsof -U | grep -c / 13 vs2066134:~# Soweit nichts besonderes. Die beiden letzten Befehle sind von diversen Fehlermeldungen der Form lsof: no pwd entry for UID 0 begleitet. Da scheint es einen Fehler in deiner /etc/passwd oder /etc/group zu geben. Kann es sein, dass der Eintrag für User/Gruppe 0 (root) fehlt oder korrupt ist? Ich bekomme aber trotzdem ständig Fehler Too many open files ?!? Das geht soweit, daß ich mich teilweise nicht einloggen kann, weil der SSH die PAM-Authorisierung nicht vornehmen kann! Es gibt, wie schon in einer anderen Antwort genannt, auch ein Limit für offene Files pro Prozess. Siehe ulimit -a und /etc/security/limits.conf. Es wäre hilfreich, wenn du herausfinden könntest, welches Prozess diese Fehlermeldung generiert. Steht irgendwas in den Logfiles? Bei der Durchsicht des Outputs von 'lsof' fiel mir auf, daß TLS sehr viele Prozesse offen hat (lsof | grep -c tls ergibt 323) - ist das normal auf einer Box, die einen fast nur privat genutzten SSL-Apache (PHP4), MySQL für localhost, exim4 mit TLS-Unterstützung und FTP nach aussen anbietet? Ja. tls ist kein Prozess, sondern ein Pfadbestandteil zahlreicher Libraries unter /lib/tls/libxxx.so. Jeder Prozess hält während seiner Ausführung zu jeder seiner dynamisch gelinkten Library ein offenes Filehandle. Gruß, Harald -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
Joerg Friedrich [EMAIL PROTECTED] writes: man sysctl echo sys/fs/file-max=dein gewünschter wert /etc/sysctl.conf Nein, wenn schon, dann richtig: echo fs.file-max=gewünschter Wert /etc/sysctl.conf Und aus proc(5): ,[ proc(5) ] | If you increase /proc/sys/fs/file-max, be sure to increase | /proc/sys/fs/inode-max to 3-4 times the new value of | /proc/sys/fs/file-max, or you will run out of inodes. ` Ralf
Re: too many open files, die Zweite
Friedemann Schorer [EMAIL PROTECTED] writes: Moin! Nachdem mir heute ja schon vielfach sehr hilfreich geantwortet wurde (DANKE!), bin ich noch auf ein Problem gestoßen, das mich etwas hilflos macht: vs2066134:~# cat /proc/sys/fs/file-max 262144 vs2066134:~# lsof | grep -c / 1411 vs2066134:~# lsof -U | grep -c / 13 vs2066134:~# Interessanter wäre file-nr in diesem Fall. Filehandles werden nicht nur für Dateien im Dateisystem verwendet. Und, sagtest du irgendwo etwas von Vserver oder Virtuozo? Da hast du nur einen laufenden Kernel, in dem die Prozesse/Filesysteme der einzelnen vserver passend separiert werden. Damit teilen sich IIRC auch alle Vserver die globalen Limits des (einen) laufenden Kernels. Hast du somit ein Filehandle-Leak in einem vserver, könnte das auf die anderen durchschlagen. Ralf
Re: Too many open files
Ralf Doering [EMAIL PROTECTED] writes: Und aus proc(5): ,[ proc(5) ] | If you increase /proc/sys/fs/file-max, be sure to increase | /proc/sys/fs/inode-max to 3-4 times the new value of | /proc/sys/fs/file-max, or you will run out of inodes. ` Hmm, vergiss das. inode-max ist irgendwann in den letzten Jahren verschwunden und existiert nicht mehr. Inodes werden dynamisch allokiert wenn notwendig. Ralf -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
Friedemann Schorer: Ich bekomme im Moment regelmaessig die Fehlermeldung 'Too many open files in system' von meinen PHP-Seiten praesentiert. So weit, so schlecht - nur, wie bekomme ich das geaendert? Sieht so aus, als wenn irgendein Programm Dateien (was unter Linux auch Sockets usw. sein können) öffnet, ohne sie irgendwann zu schließen. Ich kenn mich ja mit PHP nicht aus, aber ich tippe mal, da könnte der Fehler liegen. Wie koennte ich dem Problem beikommen? Ich bin im Moment etwas ratlos und freue mich daher ueber jeden konstruktiven Tip! lsof ist Dein Freund. J. -- Every day in every way I am getting better and better. [Agree] [Disagree] http://www.slowlydownward.com/NODATA/data_enter2.html signature.asc Description: Digital signature
Re: Too many open files
Friedemann Schorer wrote: Moin! Ich habe einen Virtuozzo-basierten Root-Server mit Sarge am Laufen, der trotz ausreichend Speicher und Plattenplatz ein wenig rummuckt: Ich bekomme im Moment regelmaessig die Fehlermeldung 'Too many open files in system' von meinen PHP-Seiten praesentiert. So weit, so schlecht - nur, wie bekomme ich das geaendert? So weit ich das verstehe, aendere ich ja durch Verwendung von 'ulimit -n' nur das Filelimit in der Bash geaendert, nuetzt mir also nix fuer Apache2, PHP, Mysql und Exim4. Eine Veraenderung des Wertes in /proc/sys/fs/file-max hatte auch keinen dauernden Effekt. Wie koennte ich dem Problem beikommen? Ich bin im Moment etwas ratlos und freue mich daher ueber jeden konstruktiven Tip! Danke! Friedemann duch ma lieber den fehler der dafür verantwortlich ist .. Florian -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
am 07.03.2006, um 15:04:06 +0100 mailte Friedemann Schorer folgendes: Moin! Ich habe einen Virtuozzo-basierten Root-Server mit Sarge am Laufen, der trotz ausreichend Speicher und Plattenplatz ein wenig rummuckt: Ich bekomme im Moment regelmaessig die Fehlermeldung 'Too many open files in system' von meinen PHP-Seiten praesentiert. So weit, so schlecht - nur, wie bekomme ich das geaendert? /proc/sys/fs/file-max hatte auch keinen dauernden Effekt. er vergißt es beim reboot. Dann halt wieder dran erinnern. Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Heynitz: 035242/47215, D1: 0160/7141639 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net ===Schollglas Unternehmensgruppe=== -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
Hi Ich habe einen Virtuozzo-basierten Root-Server mit Sarge am Laufen, der trotz ausreichend Speicher und Plattenplatz ein wenig rummuckt: Ich bekomme im Moment regelmaessig die Fehlermeldung 'Too many open files in system' von meinen PHP-Seiten praesentiert. So weit, so schlecht - nur, wie bekomme ich das geaendert? So weit ich das verstehe, aendere ich ja durch Verwendung von 'ulimit -n' FS Wie koennte ich dem Problem beikommen? Ich bin im Moment etwas ratlos und FS freue mich daher ueber jeden konstruktiven Tip! Ich glaub sowas kann mit in /etc/limits.conf einstellen (in Sarge wg. Pam unter /etc/security/limits.conf.) Ich schreibe glaub weil ich nur was gelesen hab drüber und es selber nie praktisch verwendet habe. Wenn du es damit machst wäre ein Feedback hier toll wie du es gemacht hast. grüsse -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
was vergessen: PHP, Mysql und Exim4. Eine Veraenderung des Wertes in /proc/sys/fs/file-max hatte auch keinen dauernden Effekt. Wie hast du die Aenderung hier gemacht? Mit sysctl? Wenn ja sysctl ändert Kernelwerte zur Laufzeit. D.h Aenderungen sind nach Reboot wieder weg. Müsstest du also beim starten neu initialisieren. Ansonsten ist wohl schon der bessere Weg wie schon von Hr. Schnabel geschrieben...fehler eliminieren. Wenn du diese Werte zu hoch setzt und ein fehlerhafter Prozess benötigt alles Ressource, geht die Maschine auch hopps grüsse -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
Friedemann Schorer schrieb am Dienstag, 07. M�rz 2006 um 15:04:06 +0100: Moin! Ich habe einen Virtuozzo-basierten Root-Server mit Sarge am Laufen, der trotz ausreichend Speicher und Plattenplatz ein wenig rummuckt: Ich bekomme im Moment regelmaessig die Fehlermeldung 'Too many open files in system' von meinen PHP-Seiten praesentiert. So weit, so schlecht - nur, wie bekomme ich das geaendert? So weit ich das verstehe, aendere ich ja durch Verwendung von 'ulimit -n' nur das Filelimit in der Bash geaendert, nuetzt mir also nix fuer Apache2, PHP, Mysql und Exim4. Eine Veraenderung des Wertes in /proc/sys/fs/file-max hatte auch keinen dauernden Effekt. man sysctl echo sys/fs/file-max=dein gewünschter wert /etc/sysctl.conf -- Jörg Friedrich There are only 10 types of people: Those who understand binary and those who don't. -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: too many open files, die Zweite
Hi nochmal :D Mir ist noch aufgefallen, dass vielleicht eine Uebersicht ueber die laufenden Prozesse hilfreich waere, um die Frage wegen der tls-Files zu beantworten: PID TTY STAT TIME COMMAND 1 ?Ss 0:00 ini 30018 ?Ss 0:00 /sbin/syslogd 30261 ?Ss 0:00 /usr/bin/freshclam -p /var/run/clamav/freshclam.pid -d --quiet 30274 ?S 0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /usr/lib/courier/authlib/authdaemond.mysql 30275 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30279 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30281 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30282 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30283 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30284 ?S 0:00 /usr/lib/courier/authlib/authdaemond.mysql 30299 ?S 0:00 /usr/sbin/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -maxprocs=40 -maxperip=20 -pid=/var/run/courier/imapd.pid -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr/lib/courier/authlib/authdaemon /usr/bin/imapd Maildir 30301 ?S 0:00 /usr/sbin/courierlogger imaplogin 30315 ?S 0:00 /usr/sbin/couriertcpd -address=0 -stderrlogger=/usr/sbin/courierlogger -stderrloggername=imapd-ssl -maxprocs=40 -maxperip=20 -pid=/var/run/courier/imapd-ssl.pid -nodnslookup -noidentlookup 993 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/imaplogin /usr/lib/courier/authlib/authdaemon /usr/bin/imapd Maildir 30317 ?S 0:00 /usr/sbin/courierlogger imapd-ssl 30325 ?S 0:00 /usr/sbin/couriertcpd -pid=/var/run/courier/pop3d.pid -stderrlogger=/usr/sbin/courierlogger -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 110 /usr/lib/courier/courier/courierpop3login /usr/lib/courier/authlib/authdaemon /usr/lib/courier/courier/courierpop3d Maildir 30327 ?S 0:00 /usr/sbin/courierlogger courierpop3login 30341 ?S 0:00 /usr/sbin/couriertcpd -pid=/var/run/courier/pop3d-ssl.pid -stderrlogger=/usr/sbin/courierlogger -stderrloggername=pop3d-ssl -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup -address=0 995 /usr/bin/couriertls -server -tcpd /usr/lib/courier/courier/courierpop3login /usr/lib/courier/authlib/authdaemon /usr/lib/courier/courier/courierpop3d Maildir 30362 ?S 0:00 /usr/sbin/courierlogger pop3d-ssl 30369 ?Ss 0:01 /usr/sbin/exim4 -bd -q30m 30404 ?Ss 0:00 /usr/sbin/inetd 31897 ?Ss 0:00 /usr/sbin/sshd 31913 ?Ss 0:00 proftpd: (accepting connections) 31916 ?Ss 0:00 /usr/sbin/cron 31937 ?Ss 0:00 /usr/sbin/apache2 -k start -DSSL 31948 ?S 0:00 /usr/bin/perl /usr/local/confixx/pipelog.pl 6134 ?Ss 0:08 /usr/sbin/monit -Ic /etc/monit/monitrc 11537 ?Ss 0:02 /usr/sbin/clamd 26039 ?Ss 0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s start 26102 ?S 0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s 20304 ?SNs0:01 /usr/sbin/spamd --create-prefs --max-children 3 --helper-home-dir -d --pidfile=/var/run/spamd.pid 13679 ?Ss 0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s start 13704 ?S 0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s 30289 ?S 0:00 /bin/sh /usr/bin/mysqld_safe 30361 ?S 0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-locking --port=3306 --socket=/var/run/mysqld/mysqld.sock 30363 ?S 0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld 11655 ?SN 0:01 spamd child 28082 ?SN 0:01 spamd child 23820 ?SN 0:00 spamd child 25967 ?Ss 0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s start 26028 ?S 0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=RetryRunner:0:1 -s 32445 ?S 0:06 /usr/sbin/apache2 -k start -DSSL 17582 ?Ss 0:00 /usr/bin/python /usr/lib/mailman/bin/mailmanctl -s start 17648 ?S 0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=NewsRunner:0:1 -s 17757 ?S 0:00 /usr/bin/python /var/lib/mailman/bin/qrunner --runner=OutgoingRunner:0:1 -s 1962 ?S 0:00 /usr/sbin/apache2 -k start -DSSL 3195 ?S 0:00 /usr/sbin/apache2 -k start -DSSL 3490 ?R 0:00 /bin/ps ax Kann mir irgendjemand hilfreich in die Seite treten? Irgendwie bin ich gerade etwas aufgeschmissen :/ Danke! Friedemann -- Bis zu 70% Ihrer Onlinekosten sparen: GMX SmartSurfer! Kostenlos downloaden: http://www.gmx.net/de/go/smartsurfer -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL
Re: Too many open files
Moin, Friedemann Schorer wrote: So weit ich das verstehe, aendere ich ja durch Verwendung von 'ulimit -n' nur das Filelimit in der Bash geaendert, nuetzt mir also nix fuer Apache2, PHP, Mysql und Exim4. IIRC kann ein 'ulimit -n X' auch in das Startskript eines Dienstes geschrieben werden, sodass die Limits für diesen gelten. Wolf -- Büroschimpfwort des Tages: E-mail-Exorzist - Kollege, bei dem die gesamte Elektropost verloren geht. (Sven-Lukas Müller) -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: too many open files, die Zweite
Friedemann Schorer [EMAIL PROTECTED] wrote: vs2066134:~# cat /proc/sys/fs/file-max 262144 vs2066134:~# lsof | grep -c / 1411 File-Handles werden nahezu fuer jedes Objekt vergeben, das ein Prozess alloziert. Insbesondere auch fuer Netzwerkverbindungen. Ich bekomme aber trotzdem ständig Fehler Too many open files ?!? Das Insbesondere gibt es auch ein per-process Limit (ulimit -n) regards Mario -- The secret that the NSA could read the Iranian secrets was more important than any specific Iranian secrets that the NSA could read. -- Bruce Schneier -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too Many Open Files On System
Well, it obviously varies, but I just ran lsof | wc -l and it returned: [EMAIL PROTECTED]:~$ lsof | wc -l 6335 I'll try running that next time I run into problems as well. Kernel version is 2.2.20-idepci What kernel version are you using and what is the output of: lsof | wc -l -mk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
On Fri, Sep 03, 2004 at 10:57:04AM -0400, Mike Ward wrote: Well, it obviously varies, but I just ran lsof | wc -l and it returned: [EMAIL PROTECTED]:~$ lsof | wc -l 6335 I'll try running that next time I run into problems as well. Kernel version is 2.2.20-idepci Won't lsof report duped handles multiple times? sudo cat /proc/sys/fs/file-nr Three numbers: total allocated open files, free open-files, maximum open-files. When you get the error, type 'dmesg' and look for: VFS: file-max limit 4096 reached (The number may differ) If that is the error, you can change the max: (AS_ROOT) echo 16384 /proc/sys/fs/file-max This: grow_inodes: inode-max limit reached Calls for: echo 65536 /proc/sys/fs/inode-max (Change the exact numbers as needed, both examples are 4x the default) What kernel version are you using and what is the output of: lsof | wc -l -- The world's most effective spam filter: ln -sf /dev/full /var/mail/$USER -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
Interesting. I just looked, it shows I have ~40 free open files left, so maybe that's it. What sort of side effects might arise from allowing 4x the number of open files, if any? On Fri, 3 Sep 2004 08:14:01 -0700, Stefan O'Rear [EMAIL PROTECTED] wrote: On Fri, Sep 03, 2004 at 10:57:04AM -0400, Mike Ward wrote: Well, it obviously varies, but I just ran lsof | wc -l and it returned: [EMAIL PROTECTED]:~$ lsof | wc -l 6335 I'll try running that next time I run into problems as well. Kernel version is 2.2.20-idepci Won't lsof report duped handles multiple times? sudo cat /proc/sys/fs/file-nr Three numbers: total allocated open files, free open-files, maximum open-files. When you get the error, type 'dmesg' and look for: VFS: file-max limit 4096 reached (The number may differ) If that is the error, you can change the max: (AS_ROOT) echo 16384 /proc/sys/fs/file-max This: grow_inodes: inode-max limit reached Calls for: echo 65536 /proc/sys/fs/inode-max (Change the exact numbers as needed, both examples are 4x the default) What kernel version are you using and what is the output of: lsof | wc -l -- The world's most effective spam filter: ln -sf /dev/full /var/mail/$USER -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
On Fri, Sep 03, 2004 at 11:21:35AM -0400, Mike Ward wrote: Interesting. I just looked, it shows I have ~40 free open files left, so maybe that's it. They are dynamically allocated. On my system: ~ %% cat /proc/sys/fs/file-nr 913 82 4096 ~ %% 913 open file structures all but 82 in use will allocate more as needed until 4096 allocated What sort of side effects might arise from allowing 4x the number of open files, if any? I'm guessing running out of memory. Kernel memory cannot be swapped, so if the kernel is using 126MiB on a 128MiB system, you'll swap just as bad as if your system only had 2 MiB (ignoring the minor detail that remotely recent versions of Linux won't boot with that little memory). snipped -- The world's most effective spam filter: ln -sf /dev/full /var/mail/$USER -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
I've written down a few of the libraries that programs don't seem to be able to load randomly, although I'd expect that the libraries aren't significant in this case, they just happen to be trying to load them at the same time that there's too many open files. But, just in case, these are the ones that have come up in the past few days, all with cannot open library x Error 23 libatk-1.0.so.0 libdb-4.2.so libeutil.so.0 libcrypt.so.0 libutil.so.1 -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
Mike Ward wrote: I've written down a few of the libraries that programs don't seem to be able to load randomly, although I'd expect that the libraries aren't significant in this case, they just happen to be trying to load them at the same time that there's too many open files. But, just in case, these are the ones that have come up in the past few days, all with cannot open library x Error 23 libatk-1.0.so.0 libdb-4.2.so libeutil.so.0 libcrypt.so.0 libutil.so.1 What kernel version are you using and what is the output of: lsof | wc -l -mk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
I don't have an answer just a similar experience. But I did discover that it was over 100 nmbd samba files, discovered through use of ps, that gave me the clue. I never did discover what spawned all the nmbd processes. But they were the source of the too many open files errors I believe. On the other hand maybe i was wrong and someone will correct/enlighten me. Mike Ward wrote: Firstly, I apologize for having no real details on this. I'm running Debian Unstable, and seemingly randomly, I'll go to run a program or save a file or what not, and I'll get an error to the effect of too many open files on system. In one case, I rebooted to try and solve this, and within 5 minutes of starting X, it started that again. That brings me to the next part - Sometimes (often), it seems that it's a simple case of shutting down another program. In the aforementioned case, it was Internet Explorer running under Crossover Office. Another one was when ls returned Segmentation Fault while I ran tail -f on the apache error log. If I shut down tail, it worked fine. Started tailing again, and again ls would Seg Fault, but after a reboot, it's never happened again. In a bit of frustration, I didn't think to write down what file (ugh), but some commands and programs would say that a certian library couldn't be opened. That also is usually soved by shutting down a program that seemingly has nothing to do with the one that's reporting the problem. Again, I apologize for having next to no *real* information on this problem, but I will indeed post back with some now that it's become a problem rather than a minor annoyance. Any ideas are appreciated. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
On Sat, Aug 28, 2004 at 10:00:35PM -0500, Ken Januski wrote: I don't have an answer just a similar experience. But I did discover that it was over 100 nmbd samba files, discovered through use of ps, that gave me the clue. Firstly, I apologize for having no real details on this. I'm running Debian Unstable, and seemingly randomly, I'll go to run a program or save a file or what not, and I'll get an error to the effect of too many open files on system. In one case, I rebooted to try and solve this, and within 5 minutes of starting X, it started that again. Linux has a file-max variable. You may be able to fix it like this: sudo sh -c 'echo 16384 /proc/sys/fs/file-max' You may also want to: sudo sh -c 'echo 65536 /proc/sys/fs/inode-max' Just don't set it too high or programs that eat file descriptors could eat all your memory (and remember, kernel pool can't be paged). -- The world's most effective spam filter: while :; do sleep 1 /var/mail/$USER; done -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too Many Open Files On System
On Sat, Aug 28, 2004 at 10:00:35PM -0500, Ken Januski wrote: Mike Ward wrote: Firstly, I apologize for having no real details on this. I'm running Debian Unstable, and seemingly randomly, I'll go to run a program or save a file or what not, and I'll get an error to the effect of too many open files on system. In one case, I rebooted to try and solve this, and within 5 minutes of starting X, it started that again. That brings me to the next part - Sometimes (often), it seems that it's a simple case of shutting down another program. In the aforementioned case, it was Internet Explorer running under Crossover Office. Another one was when ls returned Segmentation Fault while I ran tail -f on the apache error log. If I shut down tail, it worked fine. Started tailing again, and again ls would Seg Fault, but after a reboot, it's never happened again. In a bit of frustration, I didn't think to write down what file (ugh), but some commands and programs would say that a certian library couldn't be opened. That also is usually soved by shutting down a program that seemingly has nothing to do with the one that's reporting the problem. Again, I apologize for having next to no *real* information on this problem, but I will indeed post back with some now that it's become a problem rather than a minor annoyance. Any ideas are appreciated. I don't have an answer just a similar experience. But I did discover that it was over 100 nmbd samba files, discovered through use of ps, that gave me the clue. I never did discover what spawned all the nmbd processes. But they were the source of the too many open files errors I believe. On the other hand maybe i was wrong and someone will correct/enlighten me. Look at the program lsof (LiStOpenFiles). lsof lists open files and the processes that are holding them open. lsof output should help you figure out which process/program is causing the problem. I, of course, suspect Internet Explorer. It doesn't come from a source that I trust. You can install Mozilla Firefox, or Opera, which is non-free, on unstable. Both work fine in Sarge, which I'm using. -- Paul E Condon [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: too many open files
am 15.03.2004, um 9:29:09 +0100 mailte Tom Schmitt folgendes: Aber drei Fragen habe ich da noch: 1. Wie stellt man fest, welches Programm diese ganzen Files geöffnet hat? (Denn das sind bei mir immerhin gut 50 000 und das kann einfach nicht richtig sein) lsof 2. Wenn man die Zahl der maximal geöffneten Files einfach so hochsetzen kann, welchen Sinn macht es dann, dass sie per default sehr niedrig angesetzt ist? (Oder andersrum: Kann ich die Zahl bedenkenlos beliebig erhöhen?) Damit nicht unnötig Ressourcen verbraten werden, um diverse Systemtabellen aufzubauen. 3. Kann ich die Zahl der maximal zu öffnenden Files gezielt für einen bestimmten Prozess begrenzen? ? Andreas -- Andreas Kretschmer(Kontakt: siehe Header) Tel. NL Heynitz: 035242/47212 GnuPG-ID 0x3FFF606C http://wwwkeys.de.pgp.net ===Schollglas Unternehmensgruppe=== -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: too many open files
Hallo! On 15 Mar 2004 at 09:29 +0100, Tom Schmitt wrote: ich bekomme von meinem System die Meldung too many open files. [...] 3. Kann ich die Zahl der maximal zu öffnenden Files gezielt für einen bestimmten Prozess begrenzen? Mit 'ulimit -n', siehe auch 'help ulimit' in der Bash. Wenn du das auf Benutzer- respektive Gruppenbasis regeln willst, kannst du die /etc/security/limits.conf anpassen. Gruß, Elmar -- [ GnuPG: D8A88C0D / 2407 063C 1C92 90E9 4766 B170 5E95 0D7F D8A8 8C0D ] ··· Denn wahrlich! da ist nichts Armseligeres als der Mensch Unter allem, soviel da auf der Erde atmet und kriecht. -- Homer, Ilias pgp0.pgp Description: PGP signature
Re: too many open files
Tom Schmitt wrote: Hi, ich bekomme von meinem System die Meldung too many open files. Also habe ich erst mal gegoogelt, wie man feststellt, wieviel Files denn geöffnet werden dürfen und wie man diese Zahl hochschraubt. Aber drei Fragen habe ich da noch: 1. Wie stellt man fest, welches Programm diese ganzen Files geöffnet hat? (Denn das sind bei mir immerhin gut 50 000 und das kann einfach nicht richtig sein) Benutzt Du kde-2.2 ohne Dich mehrere Tage/Wochen auszulogen? Bernd -- Haeufig gestellte Fragen und Antworten (FAQ): http://www.de.debian.org/debian-user-german-FAQ/ Zum AUSTRAGEN schicken Sie eine Mail an [EMAIL PROTECTED] mit dem Subject unsubscribe. Probleme? Mail an [EMAIL PROTECTED] (engl)
Re: Too many open files
Hi, before changing anything, i want to know what's wrong. Unmounting my ntfs partitions has no effects (just a try to see). I'm going to read linux/Documentation/sysctl/fs.txt and about mke2fs ; if you know any means to diagnose the pb, let me know. BTW : what are FDs ? merci Fred msg05957/pgp0.pgp Description: PGP signature
Re: Too many open files
On Tue, Oct 08, 2002 at 09:16:32AM +0200, Fred wrote: Hi, before changing anything, i want to know what's wrong. Unmounting my ntfs partitions has no effects (just a try to see). I'm going to read linux/Documentation/sysctl/fs.txt and about mke2fs ; if you know any means to diagnose the pb, let me know. BTW : what are FDs ? File Descriptors (a.k.a. file handles). Each process uses as many file descriptors as it has files open (+ TCP/IP connections, i think - not sure). Typically each file uses a minimum of 3: stdin, stdout and stderr. Plus whatever open files it inherits and opens itself. You can monitor the number of open filehandles through (amongst other things) sar -v - in the sysstat package. HTH -- Karl E. Jørgensen [EMAIL PROTECTED] www.karl.jorgensen.com ... An rfc2324 advocate http://www.rfc.net/rfc2324.html msg05974/pgp0.pgp Description: PGP signature
Re: Too many open files
On Mon, Oct 07, 2002 at 04:17:26PM +0200, Fred wrote: -How do I solve this ? Echoing a different max number ? is it a definitive solution (how about the next boot) ? I'm not sure why you have so many files open, but yes, you can change the limit at runtime by echoing a new number to the file under /proc. I'm not sure what the recommended Debian solution is, but I use sysctl and add entries like that to /etc/sysctl.conf. The init scripts should run sysctl at boot to load the parameters from that file. -- Michael Heironimus -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too many open files
Am Mon, 2002-10-07 um 22.33 schrieb Michael Heironimus: On Mon, Oct 07, 2002 at 04:17:26PM +0200, Fred wrote: -How do I solve this ? Echoing a different max number ? is it a definitive solution (how about the next boot) ? I'm not sure why you have so many files open, but yes, you can change the limit at runtime by echoing a new number to the file under /proc. I'm not sure what the recommended Debian solution is, but I use sysctl and add entries like that to /etc/sysctl.conf. The init scripts should run sysctl at boot to load the parameters from that file. what about the ulimit? i think this is also necessary to increase the number of FDs per session! and there is also a pams_limits module (if you use pams). maybe you should check the config for this at [1] btw: what are you doing to exceed the max numbers of FDs? maybe i have missed sth. cu [1] http://www.us.kernel.org/pub/linux/libs/pam/modules.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: Too many open files
--T4sUOijqQbZv57TR Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Oct 07, 2002 at 04:17:26PM +0200, Fred spake thus: Hi, =20 It 's the third time my debian is complaining, just after booting, with a too many open files, creating each time many files in my home directory I log to. Searching in Google, some files in /proc/sys/fs enable to change this behaviour. =20 -Why do I have this message ? : just after logging, I'm surprised there are so many open files ( file-max reports 8192 ) : apache, ftp server, exim, fetchmail, samba and=20 classic services are the main things that are running. =20 -How do I solve this ? Echoing a different max number ? is it a definitive solution (how about the next boot) ? =20 =20 thanks =20 Fred Hi Fred, I ran into this limit, too; to increase the default limit, I added the following script to my machine as /etc/init.d/setmaxfiles.sh: 8- #! /bin/sh # Prevents kernel error message 'Too many open files' due to # the 8096 default. For more info, see: # http://sdb.suse.de/en/sdb/html/jreuter_imap_filemax.html # http://www.patoche.org/LTT/kernel/0128.html =20 echo 65536 /proc/sys/fs/file-max # This one for 2.2.x kernels only -- not for 2.4.x kernels: #echo 131072 /proc/sys/fs/inode-max 8- I have a symlink to this set up like so: $ cd /etc/rcS.d $ ls -l | grep setmax lrwxrwxrwx1 root root 26 Aug 1 23:30 S37setmaxfiles.= sh - /etc/init.d/setmaxfiles.sh With the above in place, the default is increased when the system boots up. Of course, it's safe to just run this from the command line on a running system, too; the limit is increased immediately. HTH, -Al --=20 a l a n d. s a l e w s k i [EMAIL PROTECTED] We have introduced a formidable cross-platform 32-bit suite. Generated from WWW Marketing Phrase gizmo: www.lyra.org/phrase.cgi --T4sUOijqQbZv57TR Content-Type: application/pgp-signature Content-Disposition: inline -BEGIN PGP SIGNATURE- Version: GnuPG v1.0.6 (GNU/Linux) Comment: For info see http://www.gnupg.org iD8DBQE9omsLfJJcs/osNYgRAm3fAKCSvDDYZwxXdWggkprcX+qzEhB5DACffLFj oCLvLGiEduhvMLLOtsEoCg8= =py9D -END PGP SIGNATURE- --T4sUOijqQbZv57TR-- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: too many open files
i've recently reinstalled my debian system and i am now getting the following error message: Jan 12 09:00:15 random amd[1162]: setmntent(/etc/mtab, r+): Too many open files any ideas, or pointers to the fm are welcomed. The kernel's out of file handles. Go to /proc/sys/kernel and look at file-max as compared to file-nr as well as inode-max compared to inode-nr. I think nr is the number currently in use... but I could swear I've seen it go higher than max. Anyway, the solution is just to put larger numbers in the max files. In my /etc/init.d, I've got a file called setmaxfiles.sh that contains: echo 4096 /proc/sys/kernel/file-max echo 12288 /proc/sys/kernel/inode-max Then, I made a symlink to it from /etc/rcS.d/S37setmaxfiles.sh so that it will update the kernel structures every time it boots (as it goes through single-user mode). - Joe
Re: Too many open files: ulimits
On Wed, 2 Jul 1997 [EMAIL PROTECTED] wrote: Take a look at /etc/lshell.conf Oh, that's it, thanks! Now one question... I have fortunes installed and fortunes-mod. With this setup if one types fortune it will try to open 74 files! (The fortunes and the .dat files plus stdio et al) I know this is not normal, but anyway, isn't 24 files a little bit low (24 is the default in lshell.conf) BTW, I modified the profile to open a single (user selectable) file (a lot of users here like cookies and the rest doesn't mind...) Thanks a lot to all of you who responded. And yes, I'll look closely to what I'm installing. Marcelo Magallon -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Too many open files: ulimits
On 1 Jul, Marcelo E. Magallon wrote: On 29 Jun 1997, Karl M. Hegbloom wrote: Your `ulimit's are too low. Here's what I do, in /etc/profile for now. PS: BTW, I cann't change this limit as a normal user anyway. I can change it as root but for root only. Take a look at /etc/lshell.conf Ciao, Martin -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Too many open files: ulimits
On 29 Jun 1997, Karl M. Hegbloom wrote: Your `ulimit's are too low. Here's what I do, in /etc/profile for now. This exactly the problem I'm having. The ulimit is set to 24. But I cann't find where to set this... (I know ulimit -n 256) What I don't get is why on another debian machine the ulimit is set to 256. I haven't changed anything related to this. My only guess is that some package is changing this limit but I cann't find which one. (I have login installed). Any ideas? Thanks Marcelo Magallon PS: BTW, I cann't change this limit as a normal user anyway. I can change it as root but for root only. -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: Too many open files: ulimits
Marcelo == Marcelo E Magallon [EMAIL PROTECTED] writes: Marcelo Hi, I'm getting this message very often in one of the Marcelo Debian Linux machines I work with, and I have no clue of Marcelo where to start looking. It's not coming from the kernel Marcelo since it's not logged along other kernel messages, but it Marcelo shows up in the console. MarceloThe first time I saw it, it came from fortune. But Marcelo now it's coming from various tex programs, lyx, ldconfig, Marcelo and others. Your `ulimit's are too low. Here's what I do, in /etc/profile for now. (If the user changes shells to non-sh, it won't get run unless, in the /etc/$shell-init script for that shell, a similar command is run.) I think this works better than Lshells, or the similar settings in the `login.defs' file. It will also set ulimits for `sshd' logins. (sshd has its own internal login, and thus bypasses ulimit settings for the standard login you'd get with rlogin or telnet.) Clipped from the top of /etc/profile: # -- # Set the Limits - this will work for `slogin`s too. # -- # The format of /etc/ulimits.conf is: #login_id:core:D:F:L:M:N:S:T:U:V mylimits=$(grep ^$(whoami) /etc/ulimits.conf) if [ -z $mylimits ]; then mylimits=$(grep default /etc/ulimits.conf) fi eval $(echo $mylimits | awk -F: \ '{printf(\ ulimit -c %s;\ ulimit -d %s;\ ulimit -f %s;\ ulimit -l %s;\ ulimit -m %s;\ ulimit -n %s;\ ulimit -s %s;\ ulimit -t %s;\ ulimit -u %s;\ ulimit -v %s,\ $2,$3,$4,$5,$6,$7,$8,$9,$10,$11)}') # clean up a little. unset mylimits #--- This is all of /etc/ulimits.conf: # help ulimit # ulimit: ulimit [-SHacdflmnpstuv] [limit] # Ulimit provides control over the resources available to processes # started by the shell, on systems that allow such control. If an # option is given, it is interpreted as follows: # -Suse the `soft' resource limit # -Huse the `hard' resource limit # -aall current limits are reported # -cthe maximum size of core files created # -dthe maximum size of a process's data segment # -fthe maximum size of files created by the shell # -l the maximum size a process may lock into memory # -mthe maximum resident set size # -nthe maximum number of open file descriptors # -pthe pipe buffer size # -sthe maximum stack size # -tthe maximum amount of cpu time in seconds # -uthe maximum number of user processes # -vthe size of virtual memory # If LIMIT is given, it is the new value of the specified resource. # Otherwise, the current value of the specified resource is printed. # If no option is given, then -f is assumed. Values are in 1024-byte # increments, except for -t, which is in seconds, -p, which is in # increments of 512 bytes, and -u, which is an unscaled number of # processes. # H so how does that go again? # 1024 bytes is 1k... # 1k * 1024 = 1024is 1 Mb60 * 60 = 3600 seconds/hour # 2048is 2 Mb # 4096is 4 Mb # 8192is 8 Mb # 12288 is 12 Mb # 16384 is 16 Mb # 18432 is 18 Mb # 24576 is 24 Mb # 32768 is 32 Mb # The format of this file is: #login_id:core:D:F:L:M:N:S:T:U:V default:0:16384:8192:4096:18432:128:8192:3600:32:24576 # More priveledged users: karlheg:unlimited:unlimited:unlimited:unlimited:unlimited:1024:unlimited:unlimited:unlimited:unlimited root:unlimited:unlimited:unlimited:unlimited:unlimited:1024:unlimited:unlimited:unlimited:unlimited mailto:[EMAIL PROTECTED] (Karl M. Hegbloom) http://www.inetarena.com/~karlheg Portland, OR USA Debian GNU 1.3 Linux 2.1.36 AMD K5 PR-133
Re: Too many open files
Marcelo == Marcelo E Magallon [EMAIL PROTECTED] writes: Marcelo Hi, I'm getting this message very often in one of the Marcelo Debian Linux machines I work with, and I have no clue of Marcelo where to start looking. It's not coming from the kernel Marcelo since it's not logged along other kernel messages, but it Marcelo shows up in the console. The 'lsof' program will show you all of the current open files. Some program may be out of control, and taking up all the open filehandles. -- Brought to you by the letters G and Z and the number 15. Nerd. Loser. Jerk. Moron. Worm. Scum. Idiot. Fool. -- Pkunk, SCII Ben Gertzfield http://www.imsa.edu/~wilwonka/ Finger me for my public PGP key. I'm on FurryMUCK as Che, and EFNet and YiffNet IRC as Che_Fox. -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] .
Re: too many open files?
Hi I tried running apache and got back the too many open files error. There are generally two possible errors: You can have too many files open on your system (say you have lots of programs that are opening a few files each) or a single process (like apache) can open 256 files (this is the default value) The one you can increase on the fly, the other not. To increase the total number that you can open on the system, you can echo values to various files in /proc (assuming you are running 2.0.latest) How can I check/monitor the number of file descriptors being used?? cat /proc/sys/kernel/file-nr (maximum Overall open files on system opened) cat /proc/sys/kernel/inode-nr (maximum Overall open inodes on system opened) cat /proc/sys/kernel/file-max (maximum files on the system that can be opened concurrently) cat /proc/sys/kernel/inode-max (maximum inodes on the system that can be opened concurrently) Where do I change it if it needs to be increased? If you want to increase the files per process, have a look at http://www.linux.org.za/tweak.html (Yes, I know that it is almost the only thing on the server :( If you want to increase the number of maximum open files (ie the value in file-max is the same as the value in file-nr) you can echo values as follows: echo 4096 /proc/sys/kernel/file-max echo 12288 /proc/sys/kernel/inode-max (inode-max's value is almost allways 3 times the size of file-max, keep it that way!) Oskar -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: too many open files?
Ricardo Kleemann wrote: : : Hi guys, : : I tried running apache and got back the too many open files error. : : How can I check/monitor the number of file descriptors being used?? : : Where do I change it if it needs to be increased? Installed lshell? Became root via su? Heiko -- email : [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] pgp : A1 7D F6 7B 69 73 48 35 E1 DE 21 A7 A8 9A 77 92 finger: [EMAIL PROTECTED] [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: too many open files?
Thanks for the help!!! So now I'm puzzled! :( here are my values: irvine:/$ cat /proc/sys/kernel/file-nr 192 irvine:/$ cat /proc/sys/kernel/inode-nr 16801502 irvine:/$ cat /proc/sys/kernel/file-max 1024 irvine:/$ cat /proc/sys/kernel/inode-max 3072 I'm only running about 15 virtual WWW domains from apache, but when I run httpd, it reports the too many open files error! :( How can it be if before running it, there are only 192 open? Thanks again, Ricardo On Mon, 11 Nov 1996, Oskar Pearson wrote: Hi I tried running apache and got back the too many open files error. There are generally two possible errors: You can have too many files open on your system (say you have lots of programs that are opening a few files each) or a single process (like apache) can open 256 files (this is the default value) The one you can increase on the fly, the other not. To increase the total number that you can open on the system, you can echo values to various files in /proc (assuming you are running 2.0.latest) How can I check/monitor the number of file descriptors being used?? cat /proc/sys/kernel/file-nr (maximum Overall open files on system opened) cat /proc/sys/kernel/inode-nr (maximum Overall open inodes on system opened) cat /proc/sys/kernel/file-max (maximum files on the system that can be opened concurrently) cat /proc/sys/kernel/inode-max (maximum inodes on the system that can be opened concurrently) Where do I change it if it needs to be increased? If you want to increase the files per process, have a look at http://www.linux.org.za/tweak.html (Yes, I know that it is almost the only thing on the server :( If you want to increase the number of maximum open files (ie the value in file-max is the same as the value in file-nr) you can echo values as follows: echo 4096 /proc/sys/kernel/file-max echo 12288 /proc/sys/kernel/inode-max (inode-max's value is almost allways 3 times the size of file-max, keep it that way!) Oskar -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: too many open files?
Thanks!!! I did su to root! That must be the reason! I'll give it a try! Ricardo On Mon, 11 Nov 1996, Heiko Schlittermann wrote: Ricardo Kleemann wrote: : : Hi guys, : : I tried running apache and got back the too many open files error. : : How can I check/monitor the number of file descriptors being used?? : : Where do I change it if it needs to be increased? Installed lshell? Became root via su? Heiko -- email : [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] pgp : A1 7D F6 7B 69 73 48 35 E1 DE 21 A7 A8 9A 77 92 finger: [EMAIL PROTECTED] [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: too many open files?
Might want to look into the following settings for Apache. # Server-pool size regulation. Rather than making you guess how many # server processes you need, Apache dynamically adapts to the load it # sees --- that is, it tries to maintain enough server processes to # handle the current load, plus a few spare servers to handle transient # load spikes (e.g., multiple simultaneous requests from a single # Netscape browser). # It does this by periodically checking how many servers are waiting # for a request. If there are fewer than MinSpareServers, it creates # a new spare. If there are more than MaxSpareServers, some of the # spares die off. These values are probably OK for most sites --- MinSpareServers 5 MaxSpareServers 10 # Number of servers to start --- should be a reasonable ballpark figure. StartServers 5 # Limit on total number of servers running, i.e., limit on the number # of clients who can simultaneously connect --- if this limit is ever # reached, clients will be LOCKED OUT, so it should NOT BE SET TOO LOW. # It is intended mainly as a brake to keep a runaway server from taking # Unix with it as it spirals down... MaxClients 150 # MaxRequestsPerChild: the number of requests each child process is # allowed to process before the child dies. # The child will exit so as to avoid problems after prolonged use when # Apache (and maybe the libraries it uses) leak. On most systems, this # isn't really needed, but a few (such as Solaris) do have notable leaks # in the libraries. MaxRequestsPerChild 30 On Mon, 11 Nov 1996, Ricardo Kleemann wrote: Date: Mon, 11 Nov 1996 08:07:33 -0800 From: Ricardo Kleemann [EMAIL PROTECTED] To: Oskar Pearson [EMAIL PROTECTED] Cc: Debian Users list debian-user@lists.debian.org, Linux Kernel [EMAIL PROTECTED] Subject: Re: too many open files? Thanks for the help!!! So now I'm puzzled! :( here are my values: irvine:/$ cat /proc/sys/kernel/file-nr 192 irvine:/$ cat /proc/sys/kernel/inode-nr 16801502 irvine:/$ cat /proc/sys/kernel/file-max 1024 irvine:/$ cat /proc/sys/kernel/inode-max 3072 I'm only running about 15 virtual WWW domains from apache, but when I run httpd, it reports the too many open files error! :( How can it be if before running it, there are only 192 open? Thanks again, Ricardo On Mon, 11 Nov 1996, Oskar Pearson wrote: Hi I tried running apache and got back the too many open files error. There are generally two possible errors: You can have too many files open on your system (say you have lots of programs that are opening a few files each) or a single process (like apache) can open 256 files (this is the default value) The one you can increase on the fly, the other not. To increase the total number that you can open on the system, you can echo values to various files in /proc (assuming you are running 2.0.latest) How can I check/monitor the number of file descriptors being used?? cat /proc/sys/kernel/file-nr (maximum Overall open files on system opened) cat /proc/sys/kernel/inode-nr (maximum Overall open inodes on system opened) cat /proc/sys/kernel/file-max (maximum files on the system that can be opened concurrently) cat /proc/sys/kernel/inode-max (maximum inodes on the system that can be opened concurrently) Where do I change it if it needs to be increased? If you want to increase the files per process, have a look at http://www.linux.org.za/tweak.html (Yes, I know that it is almost the only thing on the server :( If you want to increase the number of maximum open files (ie the value in file-max is the same as the value in file-nr) you can echo values as follows: echo 4096 /proc/sys/kernel/file-max echo 12288 /proc/sys/kernel/inode-max (inode-max's value is almost allways 3 times the size of file-max, keep it that way!) Oskar -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED] -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]
Re: too many open files?
Ricardo Kleemann [EMAIL PROTECTED] writes: How can I check/monitor the number of file descriptors being used?? This I know. Install the lsof package, and use lsof (ls open files). It will give a listing of all the open files and who's using them. This program gets installed in /usr/sbin, and you need to run it as root. -- Rob -- TO UNSUBSCRIBE FROM THIS MAILING LIST: e-mail the word unsubscribe to [EMAIL PROTECTED] . Trouble? e-mail to [EMAIL PROTECTED]