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

setting a max file open limit...

Tags: None
(comma "," separated)
jdong
Registered Member
Posts
358
Karma
0

setting a max file open limit...

Tue Nov 28, 2006 7:05 pm
I remember a while back when I was downloading a torrent with 5000 or so files, KTorrent would try to open too many, pass ulimit, and spit out errors.

Has this been fixed yet? If not, it really should be... :)
George
Moderator
Posts
5421
Karma
1

Wed Nov 29, 2006 6:05 pm
I can only increase it to what the user is allowed to do, beyond that you will have to do it yourself.
jdong
Registered Member
Posts
358
Karma
0

Wed Nov 29, 2006 9:46 pm
Can ktorrent try to stay within ulimit on its own or otherwise gracefully handle hitting the max-files limit?

Most other torrent clients have a way of specifying how many files to simultaneously open.
George
Moderator
Posts
5421
Karma
1

Thu Nov 30, 2006 5:47 pm
jdong wrote:Can ktorrent try to stay within ulimit on its own or otherwise gracefully handle hitting the max-files limit?

Most other torrent clients have a way of specifying how many files to simultaneously open.


We could add this but not in in 2.1.
gregf
Registered Member
Posts
3
Karma
0

Fri Dec 01, 2006 11:20 pm
Have seen this myself and would love to see it respect ulimit myself.
Crogon
Registered Member
Posts
12
Karma
0

Sun Dec 10, 2006 4:45 am
Me too, it is extremely annoying to come home and find out the torrent crashed 6 hours ago because it opened too many files at once.

No way POSSIBLE to get this in to 2.1??

Puh-lease???

I don't care if I can control it, so long as it knows to stay within limits.
gregf
Registered Member
Posts
3
Karma
0

Sun Dec 10, 2006 5:00 am
Yeah seems like every night this week it has caused issues for me. All i'm asking is it obeys ulimit i don't care if i can tweak 500 options for it.
stoeptegel
Registered Member
Posts
1075
Karma
0

Sun Dec 10, 2006 12:05 pm
Guys, excuse me for stepping out of my position, but what in the blue are you doing with KTorrent so it needs that much connections? I can run like 45 torrents at the same time and not having any problems.
George
Moderator
Posts
5421
Karma
1

Sun Dec 10, 2006 2:12 pm
If you are running in the limit this much, then increase the limit. I think stoeptegel posted some info in another thread about how to do this.

Edit one file, set the limit to a big number and be done with it. Even if we modify KT to try to stay within the limit, this will hurt download performance.
Crogon
Registered Member
Posts
12
Karma
0

Sun Dec 10, 2006 10:03 pm
Um.. could you throw me a cookie? What should I start searching the forum for to try and find this post?

That isn't really an acceptible fix, most people wouldn't be bothered to go digging around a forum to 'fix' a problem. I am still of the opinion that something should be done to change the default behavior.

stoeptegel - One torrent, multi-thousand files in the torrent. KTorrent will allow itself to open too many files, and the whole torrent crashes with a polite error message in the status bar of the torrent.
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Dec 11, 2006 7:26 pm
Crogon wrote:That isn't really an acceptible fix, most people wouldn't be bothered to go digging around a forum to 'fix' a problem. I am still of the opinion that something should be done to change the default behavior.


Then KTorrent would need to edit a security file without the users permission. Personally i don't think that would be something cool todo towards a user, neither does is apply cleanly to the rules of the unix infrastructure.

stoeptegel - One torrent, multi-thousand files in the torrent. KTorrent will allow itself to open too many files, and the whole torrent crashes with a polite error message in the status bar of the torrent.


Multi thousand files :shock: that is asking for problems.
A torrent with that much files should of course get tarred or zipped, but that is only my opinion.
Fact is that there are some of these weird torrents out there.

I believe KTorrent already disconnects files which aren't needed, so the only thing todo here is using this fairly easy fix
http://ktorrent.org/forum/viewtopic.php ... imits+conf
jdong
Registered Member
Posts
358
Karma
0

Tue Dec 12, 2006 7:54 am
There are certainly torrents out there with that kind of file count, and nothing in the bittorrent specs say that you can't have a torrent with that many files.

Most other torrent clients work gracefully with the system-imposed max files limit and some even impose their own harsher limits on themselves.

For a torrent with 200,000 files, asking me to bump file handles for a user up to that point is absurd, and if I do it'll just overwhelm the system with file-handling overhead.

KTorrent should be able to keep only X number of files open and work with that amount at a time.

Trying to shift the blame back on the underlying OS is wrong.
J. Frank Parnell
Registered Member
Posts
7
Karma
0

Tue Dec 12, 2006 1:39 pm
Speaking as an old and decrepit Unix developer, I think jdong is correct. A properly behaving Unix app should check for EMFILE and close files it doesn't need open at the time.
George
Moderator
Posts
5421
Karma
1

Tue Dec 12, 2006 6:31 pm
J. Frank Parnell wrote:Speaking as an old and decrepit Unix developer, I think jdong is correct. A properly behaving Unix app should check for EMFILE and close files it doesn't need open at the time.


jdong's critique is valid, the problem is that we didn't really design for this, adding it in for the 2.1 release is not really feasible.

Note, that we allready close files when we can.
Crogon
Registered Member
Posts
12
Karma
0

Tue Dec 12, 2006 9:23 pm
There must be a pointer somewhere in the system that defines how many files is 'too many' or we wouldn't be getting this error about too many files. ;)

All KTorrent needs to do is learn to respect it. I'm testing out Azureus now. I'm having the opposite problem with it, I get a read error when it tries to start a torrent. But all I have to do is log out and back on and it works fine. Probab ly some wierd permissions issue, but at leaast it completes the torrent. So far anyway, I haven't gotten a 'too many files open' error yet, so I'm keeping my fingers crossed.


Bookmarks



Who is online

Registered users: Bing [Bot], Google [Bot], q.ignora, watchstar