transmission: too many open files

Bug #406486 reported by LAZA
34
This bug affects 7 people
Affects Status Importance Assigned to Milestone
Transmission
Fix Released
Unknown
transmission (Ubuntu)
Medium
Unassigned

Bug Description

Binary package hint: transmission

Since the kernel update today I got the message
too many open files
in transmission.
The other updates didn't change anything whats for transmission important.

Maybe a problem of the kernel handling?

Ubuntu 9.04
Linux ubuntu 2.6.28-14-generic #47-Ubuntu SMP Sat Jul 25 01:19:55 UTC 2009 x86_64 GNU/Linux
transmission 1.51-0ubuntu3

Revision history for this message
Krzysztof Klimonda (kklimonda) wrote :

Thanks for your report. Would you mind providing a following informations?

Result of typing
$ ulimit -a
command in terminal.
Also when a issue occure agaid do the following:
$ lsof -p `pidof transmission` > /tmp/lsof.transmission
and attach created file (/tmp/lsof.transmission) to this report.

Best Regards,
Krzysztof Klimonda

Changed in transmission (Ubuntu):
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Felipe Morales (hel-sheep) wrote :

I am having this problem too, but running the 2.6.28-13-generic kernel. I am using ext4 as filesystem for my partitions, if it can be of any relevance.

$ ulimit -a gives:
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time 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

I'm attaching the result of lsof.

Revision history for this message
LAZA (laza74) wrote :

I have an LVM with ext3.
If this might be the problem I can give you the fstab.

ulimit -a is the same like the from Felipe!

At he command lsof -p 'pidof transmission' > /tmp/lsof.transmission I got the file but the command "exits" not - is not going back to ~$.
So I can nothing say about the seriousity of the report...

Revision history for this message
Felipe Morales (hel-sheep) wrote :

I solved the problem!
I had to edit the file /etc/security/limits.conf so it contained the line:

* - nofile 2048

This tells the system to set a limit of 2048 to open files for all the users by default (check "man limits.conf"). I guessed the double of the default 1024 would be fine. It has worked for me.
Of course, this is just a workaround; I guess this limit should be changed by default in the distro.

Anyway, running:

echo "* - nofile 2048" >> /etc/security/limits.conf

should do the trick.
Regards,

Felipe Morales

Revision history for this message
LAZA (laza74) wrote :

OKay.

But in my 'limits.conf' is not one line code or something!
It's complete comment with an # at every line!

So is there a other file where the limit is set to 1024 or from where get the system this data?

But I try it out and write again if it doesn't work...

Revision history for this message
LAZA (laza74) wrote :

laza@ubuntu:~$ sudo echo "* - nofile 1536" >> /etc/security/limits.conf
bash: /etc/security/limits.conf: Permission denied

Revision history for this message
Felipe Morales (hel-sheep) wrote :

LAZA,
I forgot to say some stuff, sorry.
You have to run that command like

$ sudo -s
$ echo "* - nofile 1536" >> /etc/security/limits.conf
$ exit

This way, you have root access to the file, not just the 'echo' command (when I tried to do it the first time, I also had the problem you had). After that, restart the machine.
Also, it doesn't matter that limits.conf is wholy commented out. That just means the system is working on defaults.

BTW: Why did you chose to set the limit on open files to 1536?

Regards,

Felipe.

Revision history for this message
LAZA (laza74) wrote :

Thanks.
It was clear that I needed superuser but in one single line it didn't work....

1536 = 1024 (default) + 50 % (512)
Better not overstate ;-)

Strange to say but waiting also helps!
I got this message today again and after some hours it's gone...

BTW: Is it normal that the inserted line is AFTER the line
# End of file
???

Revision history for this message
Felipe Morales (hel-sheep) wrote :

Well, as the "# End of file" line is a comment, I guess it doesn't matter at all. You could also edit it so it comes before. I just appended it at the end because it was a quick fix.

Revision history for this message
LAZA (laza74) wrote :

'Bug' appears also in Koala - Transmission 1.75 (9117)

limits.conf is the same like under Jackalope, so I change the limit to 2048...

Revision history for this message
Frode Egeland (egeland) wrote :

I just got this on Karmic 64bit.

As it's a kernel issue, should the package the bug is attached to be changed?

$ ulimit -a
core file size (blocks, -c) 0
data seg size (kbytes, -d) unlimited
scheduling priority (-e) 20
file size (blocks, -f) unlimited
pending signals (-i) 16382
max locked memory (kbytes, -l) 64
max memory size (kbytes, -m) unlimited
open files (-n) 1024
pipe size (512 bytes, -p) 8
POSIX message queues (bytes, -q) 819200
real-time 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

$ uname -a ; lsb_release -a
Linux intersect 2.6.31-14-generic #48-Ubuntu SMP Fri Oct 16 14:05:01 UTC 2009 x86_64 GNU/Linux
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 9.10
Release: 9.10
Codename: karmic

Revision history for this message
primefalcon (primefalcon) wrote :

I had this issue as well in the most recent version of transsmission, I've just added that like to my /etc/security/limits.conf now

Revision history for this message
nikolz419 (nickdichiera) wrote :

I am a beginner with ubuntu 9.10 and I can't figure out how to fix this problem. Could someone please help me with step by step directions

Revision history for this message
Pernig (j-jinks) wrote :

I tried changing the limit to 2048 in Karmic and it seems that Transmission is slow to respond to clicks whilst torrents are downloading. Also occasionally when bringing it up by single clicking on the tray is sometimes greying it out for a few seconds.

Revision history for this message
Charles Kerr (charlesk) wrote :

I believe this is fixed now in 1.80 beta 4 due to the changes made in http://trac.transmissionbt.com/browser/trunk/libtransmission/fdlimit.c?rev=9797

Revision history for this message
Charles Kerr (charlesk) wrote :

I'm closing this ticket because the bug has been fixed in the latest development version of Ubuntu - Lucid Lynx. It won't be fixed in previous versions of Ubuntu because the package doesn't fit the requirements for backporting. See https://help.ubuntu.com/community/UbuntuBackports for more information.

Thank you for taking the time to report this bug and helping to make Ubuntu better!

Changed in transmission (Ubuntu):
importance: Low → Medium
status: Incomplete → Fix Released
Changed in transmission:
status: Unknown → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.