-
Bug
-
Resolution: Fixed
-
P3
-
1.1
-
1.2fcs
-
sparc
-
solaris_2.5
-
Not verified
The RMI transport accepts connections in one thread and then spawns a new
thread to accept the next connection. This accept strategy sometimes
ends up refusing connections to clients if client requests happen in a burst
that is larger than the TCP queue (currently the ServerSocket defaults to
a backlog of 50 incoming connections).
Several things can be done to mitigate connection refusal under bursty
conditions. One thing to do is increase the length of the queue when a
ServerSocket is created (100 perhaps). The other thing to do is to
accept in a single thread and spawn a thread to handle the connection
rather than spawning a thread to do the accept. This will result in a
slower handling messages received on a connection since the connection
establishment must wait until the thread servicing the connection is
started. However, handling the accepting in a thread will allow much
faster servicing of connection requests thus preventing clients from
experiencing "connection refused" in many circumstances.
thread to accept the next connection. This accept strategy sometimes
ends up refusing connections to clients if client requests happen in a burst
that is larger than the TCP queue (currently the ServerSocket defaults to
a backlog of 50 incoming connections).
Several things can be done to mitigate connection refusal under bursty
conditions. One thing to do is increase the length of the queue when a
ServerSocket is created (100 perhaps). The other thing to do is to
accept in a single thread and spawn a thread to handle the connection
rather than spawning a thread to do the accept. This will result in a
slower handling messages received on a connection since the connection
establishment must wait until the thread servicing the connection is
started. However, handling the accepting in a thread will allow much
faster servicing of connection requests thus preventing clients from
experiencing "connection refused" in many circumstances.