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

Weird Too many open files error

Tags: None
(comma "," separated)
User avatar
bassmadrigal
Registered Member
Posts
113
Karma
0

Weird Too many open files error

Sun Oct 21, 2007 3:56 pm
Today I had the error with "Too Many Open Files". This is weird as I have had the same settings ever since I started using ktorrent back with 2.0.3. My global is set to 800 connections and individual torrents are set to 120. I had six torrents queued up to seed. I had it set for 5 uploads at a time with 4 slots per torrent.

According to my DD-WRT (flashed linksys router with more features) I had less than 600 connections. It ended up taking all my torrents but one and errored out. And it did it about 5 minutes apart per torrent.

1x torrent with 0 folders 1 file
2x torrents with 1 folder 2 files
1x torrent with 2 folders 21 files
1x torrent with 1 folder 27 files
1x torrent with 1 folder 3 files

My ulimit for files shows 1024. The thing that bothers me is it errored out all but one torrent. Assuming I had 500 files open outside of ktorrent (which I think is really high) once I was down to 4 active it should have stayed at 480 connections per torrent, which should have been enough for the system.

Any pointers on how to get this resolved, because I don't think that lowering my global connection limit will help and I can raise the ulimit for my account (or at least I could only figure out how to do it for root, but then when I went back to my terminal it was back to the 1024).

I am still running 2.2.2. Have you made any changes in the SVN that could possibly resolve this? So far this is the first time I have had this error, and it is weird because it is the lowest my queue has been for about 4 weeks.

Thanks
Jeremy
George
Moderator
Posts
5421
Karma
1

Mon Oct 22, 2007 6:13 pm
The limit is per program, so this won't affect other programs.

From the number you are saying, this shouldn't happen. There has been very little change on this since 2.2.2.
User avatar
bassmadrigal
Registered Member
Posts
113
Karma
0

Mon Oct 22, 2007 6:49 pm
Well without even restarting ktorrent I just hit start on the torrents and they continued fine. I am still seeding all the same torrents and it is going without problem.

Probably just a fluke on my end. I will report if it happens again.
Ozzi
Registered Member
Posts
10
Karma
0

Thu Nov 01, 2007 6:37 am
I'd found same kinda error from kde4 svn version, but it might be diffirent problem there, since it looks like TCP(IPv4) incoming connections, after they are estabilished, there is no thing that handeles them in any way. According by lsof -p `pidof ktorrent` they just go to state "waiting close" until there's too many connestions and ktorrent crash after 6-7 hours. (I have only one bigger torrent with low count of seeders)

Only DHT connestions works. (I still wonder high count of failed auths for those, alltought it might be normal)

Also tracker announce seems to fail. Log says "Error : The process for the http://tracker.prq.to protocol died unexpectedly."

Afterall, I'm interested, if you found something from 2.2.2, or is there some known issue with this cvs version?

And, sorry for my bad english.

EDIT: Hmm.. need more check here. Now I'm running ktorrent over ssh -X and TCP connections seems to be working a lot's of better, so main prob is somewhere in my KDE4 env. There's still alot of (CLOSE_WAIT) messages in open files. ( lsof -p `pidof ktorrent`) And count of them seems to get higher, but much lesser speed than if I log with 'sux' command in my dev env.
Orange
Registered Member
Posts
4
Karma
0

Too many open files

Thu Jan 24, 2008 8:43 pm
I too am getting the same "too many open files" error.
I am using Ktorrent version 2.0.3 with KDE 3.5.5, and Debian Linux, latest version.

As someone else commented, it's a program limitation, not a system-wide
limitation. I have increased the system max open files parameter from
200,000 to 600,000 and it doesn't change anything.

It really would be nice if this limitation were set MUCH higher. I have to seed a lot of unpopular low-demand files to get someone to download something from me now and then, to fix my up/down ratio with various trackers.
And I always have a lot of almost-finished torrents that are stranded, and
I have to wait a month or two for someone to wake up and seed that file
for an hour. And I have to keep those things online, attempting to download all of the time, or I will miss the time slot when somebody does seed that obscure file for an hour.
All of those things take up precious slots, and soon I am getting that error message of too many open files, and have to remove some seeders from
the list.

How about increasing the limit by at least a factor of 10? Or even more?
100 times more? Or better yet, allocate memory for the tables dynamically with malloc() in an extendable linked list, and have no limit.

Memory is cheap. I have 2 Gigabytes in the system, and 7 Gigabytes
of swap space, so it won't hurt to have a very large table of
leechers and seeders. It would help a lot. I wouldn't mind being able to
seed everything I ever downloaded (much of which is very low demand, unpopular stuff, like history and mathematics).

Thanks.
stoeptegel
Registered Member
Posts
1075
Karma
0

Fri Jan 25, 2008 11:35 am
I have seen a fix coming by for this recently, and probably this weekend there is going to be a new release, so we would all be satisfied again.
Orange
Registered Member
Posts
4
Karma
0

Sun Mar 02, 2008 11:30 am
stoeptegel wrote:I have seen a fix coming by for this recently, and probably this weekend there is going to be a new release, so we would all be satisfied again.



Um, that was January; this is March, and I still can't find a new version with a fix for number of open files. Is there one?
George
Moderator
Posts
5421
Karma
1

Sun Mar 02, 2008 5:03 pm
Try the latest version, 2.0.3 is very old.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Mon Mar 03, 2008 6:00 am
Orange wrote:Um, that was January; this is March, and I still can't find a new version with a fix for number of open files. Is there one?

Upgrade by adding the following to your /etc/apt/sources.list (i386 & amd64 only):

deb http://alioth.debian.org/~modax-guest/ktorrent-etch/ ./

and doing usual upgrade procedure with either apt-get, aptitude, synaptic etc.

You will get ktorrent 2.2.5 + ktorrent-kde3 branch changes up to r77528. It's a current version from Debian unstable (sid) backported to Debian stable (etch).
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Mar 03, 2008 6:03 pm
You got to be kidding me, 2.0.3 on debian stable? 2.2.5 is much more stable and has numerous bittorrent fixes! They really should consider upgrading when it comes to a bittorrent client.
Orange
Registered Member
Posts
4
Karma
0

Sun Mar 16, 2008 7:21 pm
MoDaX wrote:Upgrade by adding the following to your /etc/apt/sources.list (i386 & amd64 only):

deb http://alioth.debian.org/~modax-guest/ktorrent-etch/ ./

and doing usual upgrade procedure with either apt-get, aptitude, synaptic etc.

You will get ktorrent 2.2.5 + ktorrent-kde3 branch changes up to r77528. It's a current version from Debian unstable (sid) backported to Debian stable (etch).


Thank you very much. That worked. It's a welcome change. I've been very frustrated by the distribution of a very old version of Ktorrent with Debian, and didn't know that I could do much about it.
I didn't know about this trick of adding additional sources to apt.
But now I know, and will watch for more such upgrades.
stoeptegel
Registered Member
Posts
1075
Karma
0

Mon Mar 17, 2008 5:43 pm
Orange wrote:But now I know, and will watch for more such upgrades.


Note that you will probably loose your support when you add there sort of additional repositories.
MoDaX
Registered Member
Posts
241
Karma
0
OS

Mon Mar 17, 2008 5:51 pm
stoeptegel wrote:Note that you will probably loose your support when you add there sort of additional repositories.

He won't because I'm ktorrent maintainer in Debian.


Bookmarks



Who is online

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