I have the following scenario:
- A simple server that serves words out of a dictionary
- A simple client that repeatedly asks the server for a word, sleeping for up
to three seconds between requests
- The server is registered with a single rmiregistry process
If I start up to about 15 client processes, all is well. However, additional
clients that I try to start after this simply hang forever, not indicating that
they are unable to contact the RMI registry. Trussing the registry process
indicates that it is not seeing the incoming bind requests, presumably because
it has (silently!!) run out of file descriptors.
To make matters worse, killing client processes does not help. I can see, using
truss, that rmiregistry is closing at least some of the appropriate TCP
connections, but when I try to run new clients, they hang forever, and there
is again no indication that the rmiregistry process ever receives connect
requests.
To make matters worse again, if I kill off the word server and try to restart
it, it throws an exception, indicating that it could not bind to the registry
because the registry server was refusing requests. Clearly, the registry
server copes very badly with running out of file descriptors. I have to kill
it and restart it before I can continue.
- A simple server that serves words out of a dictionary
- A simple client that repeatedly asks the server for a word, sleeping for up
to three seconds between requests
- The server is registered with a single rmiregistry process
If I start up to about 15 client processes, all is well. However, additional
clients that I try to start after this simply hang forever, not indicating that
they are unable to contact the RMI registry. Trussing the registry process
indicates that it is not seeing the incoming bind requests, presumably because
it has (silently!!) run out of file descriptors.
To make matters worse, killing client processes does not help. I can see, using
truss, that rmiregistry is closing at least some of the appropriate TCP
connections, but when I try to run new clients, they hang forever, and there
is again no indication that the rmiregistry process ever receives connect
requests.
To make matters worse again, if I kill off the word server and try to restart
it, it throws an exception, indicating that it could not bind to the registry
because the registry server was refusing requests. Clearly, the registry
server copes very badly with running out of file descriptors. I have to kill
it and restart it before I can continue.
- relates to
-
JDK-4027749 difficult to recover from running out of file descriptors
- Closed