• Willkommen im Linux Club - dem deutschsprachigen Supportforum für GNU/Linux. Registriere dich kostenlos, um alle Inhalte zu sehen und Fragen zu stellen.

[solved] Limit für gleichzeitig offene Dateien hochsetzen?

Elby

Member
Wer ist so fit und kann mir erklären wie ich das folgende in Suse Linux einstellen kann?

Ich habe nämlich genau diese beschriebene Meldung und möchte das gerne hochstellen!


"
Symptom: After using Azureus for a while, you get messages popping up, saying that you couldn't open (some random file) because there are too many open files.


Problem: There are too many open files. (Well, duh.) Under unix, lots more things are files then might appear that way at first. The connection to your X server is a file, at least in as much as this error cares. Connections to trackers and peers (including seeds) are files, the files you're downloading are files (OK, no big surprise on that one), etc, etc.


Normaly, processes, at least on linux, are limited to 1024 file handles each (most unixes will have a similar limit). This, however, is changable, which gives us our workaround. It's only changable by root, which creates some caveats on our workaround. The first caveat is that you must have root access. The second is that I'm only going to give a recepie for using sudo, not su, because I use sudo, and not su. (Note that this does not cause az to run as root.)


The workaround: sudo sh -c 'ulimit -n 10240; sudo -u theorb ./azureus' (This assumes you want az to run as theorb, edit it to match local reality. It also assumes that you are in the right directory.)


Note that this will only delay the inevitable: It will make az die horribly when it gets to 10240 open files, rather then only 1024. You could give a limit of 0 (no limit), but that would allow az to use up lots of kernel memory, and thus probably mess up more then just az.

"

Gruß Elby
By the way, it may seem like the "maximum number of files opened for read/write" under AzureusConfig / Files / PerformanceOptions would help here. You'd be wrong. That only helps the number of "regular" files opened, and does not help much, because most "files" opened by Azureus are actualy TCP sockets. In fact, as of 2.0.4.8, it appears that there is a "leak". With three torrents opened, but all of them stopped (I need the bandwidth free), my az has 1358 sockets open, the vast majority of them sockets. (Oddly, I can't currently figure out what they're connected to.)
 
OP
E

Elby

Member
Na anscheinend hat keiner ne Idee!

Ich hab was gefunden

und zwar mit

su
passwort

und dann

ulimit -a

core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
file size (blocks, -f) unlimited
max locked memory (kbytes, -l) unlimited
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
stack size (kbytes, -s) unlimited
cpu time (seconds, -t) unlimited
max user processes (-u) 4095
virtual memory (kbytes, -v) unlimited
papa:/home/papa # ulimit -n 2048

wenn man nun ulimit -n 2048 eingibt wird der Wert geändert!

leider scheint das wieder zurückgestellt zu werden, wenn man exit eingibt!

An was liegt das, bzw. wo kann ich den Wert fest ändern!

Gruß Elby
 
A

Anonymous

Gast
... in /etc/security/limits kann das auf Dauer eingestellt werden.
 
OP
E

Elby

Member
Bist du da sicher?
ich hab
* nofile 10240
eingegeben, aber irgendwie scheint das nicht angenommen zu werden!

Gruß Elby
 
Hallo

mit all den Problemen habe ich mich auch rumgeschlagen, aber diese Seite hat all meine Probleme gelöst (ist die Welt nicht wunderschön ?)

http://azureus.sourceforge.net/wiki/index.php/TooManyOpenFiles

vor allem die Überschrift hat mich veranlasst die Version zu erneuern und bis jetzt kam kein einziger Fehler mehr

ansonsten steht ganz unten wie man das limit für offene Dateien global hochsetzen kann.
 
Oben