This forum has been archived. All content is frozen. Please use KDE Discuss instead.

error: too many files opened. on ktorrent 2.02

Tags: None
(comma "," separated)
jetpeach
Registered Member
Posts
28
Karma
0
i know this was reported before at sometime (not sure if it was on this forum or not, tried searching didnt see it) but i constantly get an error on this torrent file that i'm downloading where it stops downloading and says error too many files opened. somebody said it was fixed in version 2, but it is not. i haven't tried the svn, i'm shy about that kinda thing still.

basically, the torrent i'm downloading has 6350 files or so, so i understand this is far more than normal, but it is still very frustrating to not be able to complete the download. i am forced to use other software...

i can restart the torrent, and it will work fine for maybe 20-60 minutes, but then it **** out again saying too many open files.

it does not seem to be getting better as the torrent gets more complete (i'm now 75% of 13GB), in fact it might be worse because it didn't do it the first time till i had about 4GB or so i think. this surprised me since i thought once files were done they wouldnt't need to be opened again, but it might be because of uploads. i have maximum connections per torrent set to 120 and global at 600 (but no other torrents are going right now anyway.) uploads slots is set to 4.

since it sounds like ktorrent is suppose to be closing out on files it isn't using anymore, it sounds like it must not be closing some. i don't know, i'm not a developer yet but can try to provide any more information that might be helpful to you.

thanks for the great program though and looking forward to new versions! it certainly is nice to have such a lightweight program (at least compared to azureus, though i still admit azureus has very nice features...).
take care, thanks for the work,
jet
George
Moderator
Posts
5421
Karma
1

Mon Sep 11, 2006 4:51 pm
This is a very extreme case and if you are downloading to many files at the same time, you can hit this limit. KT closes when it can, but if it can't close a file, there is nothing much we can do.

I suggest that you just increase the system limits to something like 10000 for your own user, some quick googling turned up this link :

http://www.flumotion.net/doc/flumotion/ ... ystem.html

You just have to edit one file.
danomac
Registered Member
Posts
10
Karma
0

Tue Sep 12, 2006 5:15 am
While editing the file is the right solution, you might want to know exactly what you are setting. I can explain a little bit, I had to do this as well.

First, you do need to edit /etc/security/limits.conf.

I would recommend adding two lines:

Code: Select all
<username> soft nofile 4096
<username> hard nofile 8192


Of course, replace the <username> with the username ktorrent is running under.

You might notice there's a soft and a hard setting. It's fairly simple: when you login, your open files is set to the number specified by the soft setting; in the above example, 4096.

The hard setting is the actual limit. As your user, you can issue ulimit -n commands up to the limit specified there; in this case 8192.

When you change these settings, you might want to logout/login for them to take affect. (If you start a new shell it will automatically use the new settings.)
jetpeach
Registered Member
Posts
28
Karma
0

thanks for the info

Tue Sep 12, 2006 5:53 pm
thanks for the info, i made the changes to the configuration and can see that my new limit is 8192 files.

unfortunately, now ktorrent crashes after it runs for about an hour! i looked at the backtrace but i don't have debugging symbols installed, so don't think it's worth much to developers yet.

i'll try to setup debugging symbols and give a backtrace for this crash though sometime shortly.
jetpeach
Registered Member
Posts
28
Karma
0

Wed Sep 13, 2006 3:46 pm
Well I didn't figure out how to get more debugging symbols installed to help, but below is the current debugging crash report, though it probably doesn't help. There really only seems to be potentially valuable information at the end, but I included it all just in case. If anybody can tell me or guide me to a page that helps me get debugging symbols installed, I'll be happy to do that. I'll edit this post with the updated once I know how.

As I said, the crash didn't happen until I increased the number of files allowed to access as described before to 8192.
Thanks!
Code: Select all
(no debugging symbols found)
Using host libthread_db library "/lib/tls/i686/cmov/libthread_db.so.1".
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[Thread debugging using libthread_db enabled]
[New Thread -1233516864 (LWP 32410)]
[New Thread -1256621136 (LWP 32418)]
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
(no debugging symbols found)
[KCrash handler]
#6  0x08061f97 in ?? ()
#7  0x0806f00c in ?? ()
#8  0xb6fb8eb9 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#9  0xb6fb9954 in QObject::activate_signal () from /usr/lib/libqt-mt.so.3
#10 0xb734e39e in QTimer::timeout () from /usr/lib/libqt-mt.so.3
#11 0xb6fddeb1 in QTimer::event () from /usr/lib/libqt-mt.so.3
#12 0xb6f4ee56 in QApplication::internalNotify () from /usr/lib/libqt-mt.so.3
#13 0xb6f4f052 in QApplication::notify () from /usr/lib/libqt-mt.so.3
#14 0xb76ff7ab in KApplication::notify () from /usr/lib/libkdecore.so.4
#15 0xb6ee0157 in QApplication::sendEvent () from /usr/lib/libqt-mt.so.3
#16 0xb6f40843 in QEventLoop::activateTimers () from /usr/lib/libqt-mt.so.3
#17 0xb6ef3f67 in QEventLoop::processEvents () from /usr/lib/libqt-mt.so.3
#18 0xb6f67947 in QEventLoop::enterLoop () from /usr/lib/libqt-mt.so.3
#19 0xb6f6786a in QEventLoop::exec () from /usr/lib/libqt-mt.so.3
#20 0xb6f4d965 in QApplication::exec () from /usr/lib/libqt-mt.so.3
#21 0x08064e80 in ?? ()
#22 0xb67deea2 in __libc_start_main () from /lib/tls/i686/cmov/libc.so.6
#23 0x0805e281 in ?? ()
[/code]
lucke
Registered Member
Posts
205
Karma
0

Wed Sep 13, 2006 4:10 pm
You'd need to recompile ktorrent with ./configure --enable-debug=full.

There was a bug with ktorrent segfaulting when closing and George have stated to have fixed it in svn - maybe it's a related issue. If you have a way, maybe you should try a svn version.


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft