Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

On my NAS (an incredibly basic and reliable DNS-323), I use mldonkey to download files ... It worked quite well during the last 3 years, but it seems now mldonkey doesn't work.

Indeed, each time I start mldonkey, it crashes after a few hours of execution, complaining for Too many open files. Due to the fact mldonkey worked without any trouble during years, I wonder what can make it fail ...

According to some web results, I tried to ulimit -n 5000, but it didn't changed anything : mldonkey continued to fail.

What's more, it seems that when I restart mldonkey (but not the NAS), it fails far faster (which lead me to think open files are not mldonkey ones.

So.

How can I check which files are open, and what could I do to fix that ?

share|improve this question
    
as per Thibaud's answer : run lsof and post the output to mldonkey forum or bugtracker, cause mldonkey shouldn't exceed the configured limit –  ygrek Aug 1 '12 at 13:23

1 Answer 1

up vote 1 down vote accepted

You can use lsof to see wich files are open (apt-get install lsof on Debian-based linux)

List files open by user root:

lsof -u root

List files open by proc xxx:

lsof -p xxx

Show the number of files open by proc xxx:

lsof -p xxx | wc -l

When you change ulimit i am not sure that live process take the new value. Check also your /etc/security/limits.conf. It may define higher limit than 5000 by default. Notice that ulimit Limit user resources and if your NAS launch each process under the same user, 5000 doesn't seem so high.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.