Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

File descriptor leak in socket programming

843790Sep 17 2010 — edited Sep 18 2010
We have a complex socket programming client package in java using java.nio (Selectors, Selectable channel).
We use the package to connect to a server.

Whenever the server is down, it tries to reconnect to the server again at regular intervals.
In that case, the number of open file descriptors build up with each try. I am able to cofirm this using "pfile <pid>" command.
But, it looks like we are closing the channels, selectors and the sockets properly when it fails to connect to the server.
So we are unable to find the coding that causes the issue.

We run this program in solaris.
Is there a tool to track down the code that leaks the file descriptor.


Thanks.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 16 2010
Added on Sep 17 2010
2 comments
641 views