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

Error: cannot open (file) too many open files

Tags: None
(comma "," separated)
tarp404
Registered Member
Posts
15
Karma
0
Hey there. LOVE ktorrent, yall doin a great job, thanks for such a nice client.

Anyways, I got this little problem I've come across, on a torrent I've been downloading that has several thousand files inside of it. It's a few audiobooks that the creator took it upon himself to split up the audio into thousands of 1 minute mp3s. It had been downloading fine until it was almost finished, now it stops every hour or so and shows in the status something like this
Code: Select all
Error: Cannot open /home/rabble/.kde/share/apps/ktorrent/tor3/cache/6 The Half blood prince/HP_6_0764.mp3 : Too many open files.

I'm not sure how easily reproducible it is to get this error in normal operation, since during this torrent I'd also selected a couple of the possible directories to download to not be downloaded. I don't know if that has anything to with it, or is it just that there's a set file number limit within torrents that cannot be adjusted via the settings?

This happened in Ktorrent 2.1 on KDE 3.5.6, running Kubuntu Fiesty beta.
George
Moderator
Posts
5421
Karma
1

Sat Apr 14, 2007 5:27 pm
There is a system limit in linux (usually it is set to 1024).

You can try increasing that or limiting the number of network connections (network connections also count as files)
tarp404
Registered Member
Posts
15
Karma
0

Sat Apr 14, 2007 9:14 pm
That seems pretty low, is it always set to that by default? How do I change the system limit?
Orange
Registered Member
Posts
4
Karma
0

Sun Mar 02, 2008 11:52 am
tarp404 wrote:That seems pretty low, is it always set to that by default? How do I change the system limit?


The limitation that you are fighting is built into the Ktorrent program. It is not the system limitation. Increasing the Linux kernel limit will not help. I know, I did it and nothing improved.

But to increase the Linux kernel limit, see the FAQ page at
Linux FAQ the web site.

The essence of it is:
Use the following command command to display maximum number of open file descriptors:
cat /proc/sys/fs/file-max

You can increase the maximum number of open files by setting new value in kernel variable /proc/sys/fs/file-max as follows (login as the root):
# sysctl -w fs.file-max=100000

Above command forces the limit to 100000 files. You need to edit /etc/sysctl.conf file and put following line so that after reboot the setting will remain as it is:
# vi /etc/sysctl.conf
Append a config directive as follows:
fs.file-max = 100000

Save and close the file. Users need to log out and log back in again to changes take effect or just type command:
# sysctl -p
Verify your settings with command:
# cat /proc/sys/fs/file-max
OR
# sysctl fs.file-max


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]