Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
azureus failing because of "too many files open"
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
adante
n00b
n00b


Joined: 08 Jan 2004
Posts: 27

PostPosted: Sun Oct 29, 2006 6:56 am    Post subject: azureus failing because of "too many files open" Reply with quote

Sometimes when I try to run azureus, after a while I get this error:

Code:
Error: Disk read error - [fileanem] (Too many open files), open fails


This is happening at times when I am running 2-3 torrents, with maybe 10 files open in total. In azureus I have set the max files opened for read/write to 50. So, I imagine this is due to having too many open connections.

However I have tried to set the max file parameters to something rather high, but this problem still keeps happening:

Code:

pveer ~ # sysctl -a | grep file
fs.file-max = 102824
fs.file-nr = 3616       0       102824
pveer ~ # cat /proc/sys/fs/file-max
102824
pveer ~ # ulimit
unlimited



I've also tried to see how many files azureus has open
Code:

lsof -p [PID] | wc -l


unfortunately this does not terminate because lsof seems to stall maybe 5 seconds per connection (performing reverse dns lookup perhaps?) - does anybody know how to make it NOT do this?


In general, what else can I do to allow more connections to be opened by azureus, and stop it from continually failing?
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sun Oct 29, 2006 7:26 am    Post subject: Reply with quote

Use lsof -n, so it won't try to resolve domain names. That makes it lots of faster.

Anyway, if Azureus REALLY tries to open that many file handles, there's probably a bigger problem underneath. Upping the file handle limit probably only makes it allocate all of them, and at some point your computer just can't handle all the handles...

But have you tried ulimit command as your user account? I see that in your code example you were root during ulimit command. Normal user account might have 1024 handle limit or so. If that's the case, give the user more handles in /etc/security/limits.conf or temporarily pump up the limit with ulimit -SHn <some_number> and then start Azureus from the same shell session.
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
adante
n00b
n00b


Joined: 08 Jan 2004
Posts: 27

PostPosted: Sun Oct 29, 2006 7:43 am    Post subject: Reply with quote

Janne Pikkarainen wrote:
Use lsof -n, so it won't try to resolve domain names. That makes it lots of faster.

Anyway, if Azureus REALLY tries to open that many file handles, there's probably a bigger problem underneath. Upping the file handle limit probably only makes it allocate all of them, and at some point your computer just can't handle all the handles...

But have you tried ulimit command as your user account? I see that in your code example you were root during ulimit command. Normal user account might have 1024 handle limit or so. If that's the case, give the user more handles in /etc/security/limits.conf or temporarily pump up the limit with ulimit -SHn <some_number> and then start Azureus from the same shell session.


thanks Janne!

And yes, to clarify, ulimit under the user account running azureus is also unlimited.

Anyway, now that I am able to run lsof in a timely manner, it appears that azureus is indeed running a little out of control.

Code:

pveer ~ # lsof -c java -n | grep TCP | wc -l
975


and this is when I am not running any torrents...

as soon as I start some, this quickly jumps 5000.. If i let it run unchecked, it reaches 55k.

Obviously this is a little bit more than i expected. I have way less than that in terms of connections to peers and files open, so evidently you are right - this is an underlying problem and something to query azureus support about
Back to top
View user's profile Send private message
Janne Pikkarainen
Veteran
Veteran


Joined: 29 Jul 2003
Posts: 1143
Location: Helsinki, Finland

PostPosted: Sun Oct 29, 2006 8:01 am    Post subject: Reply with quote

No problem. :)
_________________
Yes, I'm the man. Now it's your turn to decide if I meant "Yes, I'm the male." or "Yes, I am the Unix Manual Page.".
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum