issue with ServerSocket::accept
Bryce McKinlay
mckinlay@redhat.com
Thu Jun 17 20:26:00 GMT 2004
Simon wrote:
> I think I've just run into the same bug when trying to compile the
> Apache.org XML-RPC library. Just creating a 'Webserver' (one of the
> supplied classes that nicely handles XML-RPC requests) is sufficient
> to cause the problem. The symptoms are that the sockets don't appear
> to be being closed properly, so are hanging around, and in 20 minutes
> or so, the program dies from lack of available file descriptors
> (per-process limit set to 1024 on the machine). It doesn't happen with
> the usual javac classes.
I've heard vague rumours of this problem with some Apache.org code
before. I have not yet seen a test case to reproduce it, however, and
I'd like to understand it better. Is it possible that the WebServer
class never calls close() on its sockets, and instead relies on the
finalizers to clean them up, or something like that? A simple
ServerSocket test case I wrote didn't have any problems with file
descriptors as long as I called close() on them when finished.
Regards
Bryce
More information about the Java
mailing list