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

Too many files open error causes ktorrent crash

Tags: None
(comma "," separated)
KyferEz
Registered Member
Posts
32
Karma
0
I'm runnin Ktorrent 3.2. I did check the changlog for 3.2.1, but didn't see the error mentioned and haven't tried the newer version yet. In any event, any time I get the following error, Ktorrent crashes.
xxxx has been stopped with the following error: Cannot open /media/oneofmyntfsdrives: Too many open files

where xxxx is the filename and oneofmyntfsdrives is an external usb NTFS drive.

I've been getting this error a LOT.
George
Moderator
Posts
5421
Karma
1

Wed Apr 22, 2009 7:55 am
How many peers are you connected to in total ?

Also, what is the output of ulimit -n ?
Lain_13
Registered Member
Posts
103
Karma
0

Wed Apr 22, 2009 6:50 pm
It's not error in kTorrent. It's error in Linux configuration. Driver-independent error. Just google this words and you will find answer on your problem because I don't remember right answer. :)
There is system constant which limit amount of active connections to files. You will rise value of this constant. I had this problem on Ubuntu 8.10 but quickly fixed it.

George
I propose to add some local help-files and write here about of common bugs. When one of these bugs appear -- kTorrent will automatically open window with description of this bug.
Also you can try to add button "more..." with description to popup text or add action on click on error icon.
Common errors like this must have some local descriptions with advice "how to resolve this problem". User should understand roots of problem. Maybe he just allow too much active connections, maybe system limit is too low.
Also you can add check for max possible connections and forbid adding more connections then system can handle with some short description near about this limit.


What isn`t remembered never happened. Memory is merely a record. You just need to rewrite that record.
KyferEz
Registered Member
Posts
32
Karma
0

Thu Apr 23, 2009 8:09 pm
I can understand that the error is not a Ktorrent error... However, it causes Ktorrent to crash. Is that a bug or not?
KyferEz
Registered Member
Posts
32
Karma
0

Fri Apr 24, 2009 8:53 pm
Sorry, didn't notice your questions George.
ulimit -n = 1024
Peers = Unknown because ktorrent locks up every time the message appears.
Lain_13
Registered Member
Posts
103
Karma
0

Sat Apr 25, 2009 9:59 pm
Settings -> Configure KTorent... -> Network and look for "Global connection limit".

Try to do next:
sudo nano /etc/sysctl.conf
Search for fs.file-max and set high value (e.g., 200000). If there is no fs.file-max them add it.
fs.file-max = 200000
Now reboot your PC.

Also you can try next command: sudo ulimit -n 102400
But as I know you need to perform this command on each reboot. So, you need to add this command into init.d script or something similar.


What isn`t remembered never happened. Memory is merely a record. You just need to rewrite that record.
KyferEz
Registered Member
Posts
32
Karma
0

Thu Apr 30, 2009 1:27 am
I've made the changes suggested, and now Ktorrent crashes LOTS MORE. It just sort of freezes the display and won't update anything. The good thing is that Ubuntu doesn't lock up much anymore.
KyferEz
Registered Member
Posts
32
Karma
0

Thu Apr 30, 2009 2:16 am
Also, sometimes when I right-click on the downloading files and click Move data, nothing appears. The files will be moving, because I can see activity on my external drives, but none of the file move dialogs appear.
Lain_13
Registered Member
Posts
103
Karma
0

Thu Apr 30, 2009 7:22 pm
Aarrgh!

I completely forgot about proper way... I just installed fresh 9.04 and found proper fix again. :)
1. Remove fs.file-max. Default value is 300000+ and there is no reason to change it. At least check it with this command: cat /proc/sys/fs/file-max
2. Open file /etc/security/limits.conf
Add there:
* soft nolimit 300000
* hard nolimit 300100
3. Reboot.

After reboot use command ulimit -n to check ulimit value.

After these changes this error was fixed for me.


What isn`t remembered never happened. Memory is merely a record. You just need to rewrite that record.


Bookmarks



Who is online

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