[FIX] ulimit "open-files" too low for KTorrent

Bug #189691 reported by Thomas Ohms
0
Affects Status Importance Assigned to Milestone
ktorrent (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: ktorrent-kde4

Bug: Downloading sample amount of 26 torrents stops downloads with notification "too many open files"
Fix: set default ulimit value of "open files" from 1024 to 4096
Request: Why not set default ulimit value of "open files" higher?

Thomas Ohms (tohms)
description: updated
Steve Stalcup (vorian)
Changed in ktorrent-kde4:
assignee: nobody → vorian
status: New → Confirmed
Revision history for this message
John Dong (jdong) wrote :

This bug also applies to KTorrent KDE3 also, and has been discussed in upstream's forums before. Setting ulimit higher is only a workaround -- there's only so many times you can do that before KTorrent DoS'es the system with thousands of open file handles.

The previously agreed upon, and still unimplemented, resolution was for KTorrent to internally limit itself on the max # of open files to the ulimit, which is a more reasonable approach. Once I had a torrent I needed to download with over 16,000 files and I had to resort to Azureus, a client that uses the approach I just described.

Revision history for this message
John Dong (jdong) wrote :

I've poked upstream about this: http://ktorrent.org/forum/viewtopic.php?t=2247

Let's hope we can come up with a more solid solution before hardy releases. If not, then I'll probably begrudgingly accept raising the ulimit as a nasty workaround ;-)

Changed in ktorrent-kde4:
assignee: vorian → nobody
importance: Undecided → Medium
status: Confirmed → Triaged
Revision history for this message
Thomas Ohms (tohms) wrote :

Just to let you and members in KTorrent board know: version of KTorrent is latest already (3.0rc1)

Revision history for this message
Chow Loong Jin (hyperair) wrote :

I'd like to point out something: I had a torrent stopped because there were too many open files or something of that sort. Only one torrent running/existent in the whole queue/list of torrents. That torrent had 3 files. Perhaps the counter was not decremented when a file was closed? What's the current ulimit anyway?

Revision history for this message
John Dong (jdong) wrote :

hyperair, Older releases of ktorrent had an issue where socket descriptors were being leaked, and those count towards the ulimit too.

That issue has been fixed, but this problem with "open files" is still an open issue, and upstream so far (as you can see from that thread) has basically beat-around-the-bush at addressing it in a serious manner.

I don't support bumping up the ulimit as a fix -- it's not a fix, just a hackish workaround. I would like to see this fixed by KTorrent being able to cope with however many file handles I give it to work with.

Revision history for this message
Harald Sitter (apachelogger) wrote :

Moving bug from ktorrent-kde4 to new (and also old ;-) ktorrent source.

Revision history for this message
Jonathan Thomas (echidnaman) wrote :

The upstream thread says that even with a 5000-file torrent (over the current limit) should be handled properly. Unless there's an observable problem I'd just close this bug.

Changed in ktorrent:
status: Triaged → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

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