[jboss-user] [Remoting] - Re: Problem with backlog queue behavior ?
do-not-reply at jboss.com
Thu Feb 7 05:11:40 EST 2008
Couple of points:
1. clientMaxPoolSize=50 means that there can never be more than 50 simultaneous invocations from a given client.
2. maxPoolSize=400 means that there can never be more than 400 simultaneous invocations on the server.
3. 1) and 2) imply that, in your first example, you never came close to using the ServerSocket queue (backlog).
anonymous wrote :
| When the client has finish, the server thread should release the connection and return in the pool.
isn't quite true. When a ServerThread finishes an invocation and returns a result, the client thread will return to the pool, but it maintains a connection to the ServerThread. That is, the ServerThread can only be used by the client thread that originally connected to it, at least until a socket timeout occurs. What is happening is that the 401st invocation sees that all the client threads are busy but, since clientMaxPoolSize=404, it tries to create a new connection. However, on the server side, all of the ServerThreads are still in use. The AcceptorThread will try to "evict" one of the ServerThreads and try to reuse it, but, frankly, that's old code and I don't believe it works. In fact, I have tried to fix the eviction process in Remoting 2.4.0.Beta1. So, I believe, the AcceptorThread will hang until a ServerThread experiences a socket timeout and returns itself to the pool. It looks like the 401st client socket has timed out by that time, and then when the ServerThread finally tries to talk to the 401st socket, it finds the "connection reset".
So, setting clientMaxPoolSize > maxPoolSize is not a good idea, at least for Remoting 2.2.x. However, if you set clientMaxPoolSize=maxPoolSize=400 and create 500 simultaneous invocations with a duration less than the configured timeout value, I would expect all the invocations to work. Can you verify that?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4127304#4127304
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4127304
More information about the jboss-user