0

I'm experiencing issues with the number of files opened increasing over time. If I run my server for about few hours, it'll no more accept any connections. The limit was 1024. I've increased the limit to about 40,000 and still the number is going up everyday and it's just a matter of time until the server stop accepting connections.

is it normal number of open files keep increasing until i restart the server ? and what are the possible scenarios that may cause that problem ?

4

is it normal number of open files keep increasing until i restart the server ?

No.

and what are the possible scenarios that may cause that problem ?

Fix whatever application you have running on your system that is leaving file handles open.

Start by examining the output of lsof. This command will return a list of processes and the number of file handles they have open, sorted in decreasing order:

$ sudo lsof | cut -d " " -f 1 | uniq -c | sort -nr
  • If you don't see a single process eating them all up with the above command then look at your cron jobs. If you have a script that runs say once every 10 minutes but has a bug in it that causes it never to exit.. and you aren't using some sort of lockfile.. The number of file descriptors opened will slowly increase with every new run until you run out. – yoonix Mar 24 '14 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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