Debian etch - Too many open files in system

Status
Not open for further replies.

Dr.ChAoS

New Member
Hallo alle zusammen,

Ich habe mir vor kurzem den "VRS - Profi 09" von Keyweb geholt. Leider hatte ich bisher nur Probleme mit dem Anbieter.

So jetzt aber zu meinem Eigentlichen Problem.
Ich habe den Server heute komplett neu eingerichtet und folgende Dinge installiert und konfiguriert:
-PHP5
-lighttpd
-MySQL
-vsftpd

Hat auch bis dahin alles bestens funktioniert. Als ich jetzt aber noch Postfix und courier mit IMAP und POP3 installieren wollte war der Server so gut wie tot. Nach einer weile konnte ich nichtmal mehr den "ls" Befehl ausführen ohne dass ich die Meldung bekam "Too many open files in system". Anschließend wollte ich postfix wieder entfernen, was aber leider auch nicht mehr funktionierte. Ich bekam folgenden Fehler:
Code:
# apt-get remove --purge postfix*
Paketlisten werden gelesen... Fertig
Abhängigkeitsbaum wird aufgebaut... Fertig
Achtung, wähle postfix-pgsql für reg. Ausdruck „postfix*“
Achtung, wähle bld-postfix für reg. Ausdruck „postfix*“
Achtung, wähle postfix für reg. Ausdruck „postfix*“
Achtung, wähle postfix-mysql für reg. Ausdruck „postfix*“
Achtung, wähle postfix-ldap für reg. Ausdruck „postfix*“
Achtung, wähle postfix-smtpguard für reg. Ausdruck „postfix*“
Achtung, wähle gforge-mta-postfix für reg. Ausdruck „postfix*“
Achtung, wähle postfix-policyd für reg. Ausdruck „postfix*“
Achtung, wähle postfix-pcre für reg. Ausdruck „postfix*“
Achtung, wähle postfix-cdb für reg. Ausdruck „postfix*“
Achtung, wähle postfix-dev für reg. Ausdruck „postfix*“
Achtung, wähle postfix-doc für reg. Ausdruck „postfix*“
Achtung, wähle postfix-gld für reg. Ausdruck „postfix*“
Achtung, wähle postfix-tls für reg. Ausdruck „postfix*“
Achtung, wähle postfix an Stelle von postfix-tls
Die folgenden Pakete werden ENTFERNT:
  at* courier-imap* courier-imap-ssl* courier-pop* courier-pop-ssl* mailx* postfix* postfix-doc* postfix-mysql* sensible-mda*
0 aktualisiert, 0 neu installiert, 10 zu entfernen und 0 nicht aktualisiert.
3 nicht vollständig installiert oder entfernt.
Es müssen 0B Archive geholt werden.
Nach dem Auspacken werden 7926kB Plattenplatz freigegeben worden sein.
Möchten Sie fortfahren [J/n]? 
/bin/sh: /usr/sbin/dpkg-preconfigure: Too many open files in system
dpkg: failed to open package info file `/var/lib/dpkg/status' for reading: Too many open files in system
E: Sub-process /usr/bin/dpkg returned an error code (2)

Ich habe mich dann direkt auf die Suche nach dem Problem begeben, welche aber leider nicht erfolgreich verlief. Allerdings ist mir dabei aufgefallen dass ich ungewöhnlich viele php5-cgi Prozesse am laufen hatte:

Code:
# ps ax
  PID TTY      STAT   TIME COMMAND
    1 ?        Ss     0:00 init [2]      
19972 ?        Ss     0:00 /sbin/syslogd
20034 ?        S      0:00 /bin/sh /usr/bin/mysqld_safe
20071 ?        Sl     0:00 /usr/sbin/mysqld --basedir=/usr --datadir=/var/lib/mysql --user=mysql --pid-file=/var/run/mysqld/mysqld.pid --skip-external-lockin
20072 ?        S      0:00 logger -p daemon.err -t mysqld_safe -i -t mysqld
20123 ?        S      0:00 /usr/sbin/courierlogger -pid=/var/run/courier/authdaemon/pid -start /usr/lib/courier/courier-authlib/authdaemond
20124 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20125 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20126 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20127 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20133 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20134 ?        S      0:00 /usr/lib/courier/courier-authlib/authdaemond
20138 ?        S      0:00 /usr/sbin/courierlogger -pid=/var/run/courier/imapd.pid -start -name=imapd /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip
20139 ?        S      0:00 /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=20 -nodnslookup -noidentlookup 143 /usr/lib/courier/courier/imaplogin /usr
20144 ?        S      0:00 /usr/sbin/couriertcpd -pid=/var/run/courier/pop3d.pid -stderrlogger=/usr/sbin/courierlogger -maxprocs=40 -maxperip=4 -nodnslookup
20146 ?        S      0:00 /usr/sbin/courierlogger courierpop3login
20157 ?        S      0:00 /usr/sbin/courierlogger -pid=/var/run/courier/pop3d-ssl.pid -start -name=pop3d-ssl /usr/sbin/couriertcpd -address=0 -maxprocs=40 -
20158 ?        S      0:00 /usr/sbin/couriertcpd -address=0 -maxprocs=40 -maxperip=4 -nodnslookup -noidentlookup 995 /usr/bin/couriertls -server -tcpd /usr/l
20164 ?        S      0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
20175 ?        Ss     0:00 /usr/sbin/inetd
20178 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20179 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20180 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20185 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20187 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20188 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20190 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20191 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20192 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20193 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20194 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20195 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20196 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20197 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20198 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20199 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20200 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20201 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20202 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20203 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20204 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20205 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20206 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20207 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20208 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20209 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20210 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20211 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20212 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20213 ?        Ss     0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20214 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/serverconf.ini
20215 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20216 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20217 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20218 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20219 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20220 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20221 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/img.ini
20222 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20223 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20224 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/sigibox.ini
20225 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20226 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/chaos2k.ini
20227 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20228 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/bke07.ini
20230 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20231 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20232 ?        S      0:00 /usr/bin/php5-cgi -c /etc/hosting/php/mrxd.ath.cx.ini
20301 ?        Ss     0:00 /usr/lib/postfix/master
20302 ?        S      0:00 pickup -l -t fifo -u -c
20303 ?        S      0:00 qmgr -l -t fifo -u
20304 ?        S      0:00 cleanup -z -t unix -u -c
20311 ?        S      0:00 trivial-rewrite -n rewrite -t unix -u -c
20326 ?        Ss     0:00 /usr/sbin/sshd
20330 ?        Ss     0:00 /usr/sbin/vsftpd
20336 ?        Ss     0:00 /usr/sbin/xinetd -pidfile /var/run/xinetd.pid -stayalive
20377 ?        S      0:00 local -t unix
20396 ?        Ss     0:00 sshd: root@pts/0 
20458 pts/0    Ss     0:00 -bash
21527 pts/0    R+     0:00 ps ax

Das liegt aber wahrscheinlich daran dass ich in lighttpd fastcgi verwende.
Leider habe ich überhaupt keine Idee mehr was ich noch machen könnte.
Könnt ihr mir vielleicht sagen wie ich das Problem lösen kann?

Noch ein paar Ausgaben die vielleicht helfen:

cat /proc/user_beancounters:
Code:
       uid  resource           held    maxheld    barrier      limit    failcnt
      102:  kmemsize        9664054    9667626    9871360   10158080         55
            lockedpages           0          0        256        256          0
            privvmpages       69791      69824     262144     262200          0
            shmpages            640        640      21504      21504          0
            dummy                 0          0 2147483647 2147483647          0
            numproc              90         90        240        240          0
            physpages         24322      24322          0 2147483647          0
            vmguarpages           0          0     196608 2147483647          0
            oomguarpages      24322      24322 2147483647 2147483647          0
            numtcpsock           10         10        360        360          0
            numflock              9          9        188        206          0
            numpty                1          1         16         16          0
            numsiginfo            0          1        256        256          0
            tcpsndbuf        100620     100620    1720320    2703360          0
            tcprcvbuf        163840     163840    1720320    2703360          0
            othersockbuf     163228     163228    1126080    2097152          0
            dgramrcvbuf           0          0     262144     262144          0
            numothersock        129        129        360        360          0
            dcachesize            0          0    2273280    2416640          0
            numfile            5814       5814       5820       5820       5910
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            dummy                 0          0          0          0          0
            numiptent            14         14        400        400          0

ulimit -a:
Code:
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
max nice                        (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) unlimited
max locked memory       (kbytes, -l) unlimited
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) unlimited
max rt priority                 (-r) 0
stack size              (kbytes, -s) 8192
cpu time               (seconds, -t) unlimited
max user processes              (-u) unlimited
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Vielen Dank schonmal

MfG

Dr.ChAoS

//Edit: Jetzt bekomme ich sogar folgenden Fehler beim Einloggen:
Code:
-bash: /usr/bin/id: Too many open files in system
-bash: [: : integer expression expected
 
Hallo,

Dieses Problem haben wir schon hier besprochen:
 
Status
Not open for further replies.
Back
Top