Skip to content
Advertisement

Too many open file handles

I’m working on a huge legacy Java application, with a lot of handwritten stuff, which nowadays you’d let a framework handle.

The problem I’m facing right now is that we are running out of file handles on our Solaris Server. I’d like to know what’s the best way to track open file handles? Where to look at and what can cause open file handles to run out?

I cannot debug the application under Solaris, only on my Windows development environment. Is is even reasonable to analyze the open file handles under Windows?

Advertisement

Answer

One good thing I’ve found for tracking down unclosed file handles is FindBugs:

http://findbugs.sourceforge.net/

It checks many things, but one of the most useful is resource open/close operations. It’s a static analysis program that runs on your source code and it’s also available as an eclipse plugin.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement