• Post Reply Bookmark Topic Watch Topic
  • New Topic

Too many Open Files Exception  RSS feed

 
ravinder pasula
Greenhorn
Posts: 7
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a very big application. When I run the application, at some point of the time, it gives "Too many open files exception".

Can anyone let me know about any tool which analyses my application and reports me of the open file handles.

I request you to suggest me in this regard

Thankyou..
ravinder.
 
Stefan Willi
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try FindBugs.

From the description:
OS: Method may fail to close stream

The method creates an IO stream object, does not assign it to any fields, pass it to other methods, or return it, and does not appear to close the stream on all paths out of the method. This may result in a file descriptor leak. It is generally a good idea to use a finally block to ensure that streams are closed.


Stefan
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!