Finally I have downloaded the 4.2.2 version of JBoss and the 2.2.2.SP3 version 
of Remoting.
I have proceed with the same approach as previously, using the folowing 
configuration :

  |             <invoker transport="socket">
  |                <attribute 
name="serverBindAddress">${jboss.bind.address}</attribute>
  |                <attribute name="serverBindPort">3873</attribute>
  |                <attribute name="maxPoolSize">400</attribute>
  |                <attribute name="backlog">200</attribute>
  |                <attribute name="clientMaxPoolSize" 
isParam="true">404</attribute>
  |                <attribute name="timeout" isParam="true">50000</attribute>
  |          </invoker>
  | 

With this new version, the clientMaxPoolSize must be increase up to maxPoolSize 
for testing the backlog queue (there was not the case with 1.4.3 version of 
remoting, it was a bug ?).
When 500 threads are created on the client, the following behavior is observed 
: around the first 400 client threads, all finish and works fine. Then in 
between around the 400th and the 500th client thread, 3 of these (sometime 1, 
sometime 2) throws an exception  :

  |  org.jboss.remoting.CannotConnectException:Can not get connection to 
server. Problem establishing socket connection for InvokerLocator 
[socket://127.0.0.1:3873/?clientMaxPoolSize=404&timeout=50000]
  |    caused by : java.lang.reflect.InvocationTargetException:null
  |    caused by : java.net.SocketTimeoutException:Read timed out
  | 


A server side exception is thrown :


  | ERROR [ServerThread] Worker thread initialization failure
  | java.net.SocketException: Connection reset
  |         at java.net.SocketInputStream.read(SocketInputStream.java:168)
  |         at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
  |         at java.io.BufferedInputStream.read(BufferedInputStream.java:235)
  |         at 
java.io.ObjectInputStream$PeekInputStream.peek(ObjectInputStream.java:2200)
  |         at 
java.io.ObjectInputStream$BlockDataInputStream.readBlockHeader(ObjectInputStream.java:2380)
  |         at 
java.io.ObjectInputStream$BlockDataInputStream.refill(ObjectInputStream.java:2447)
  |         at 
java.io.ObjectInputStream$BlockDataInputStream.read(ObjectInputStream.java:2519)
  |         at java.io.ObjectInputStream.read(ObjectInputStream.java:789)
  |         at 
org.jboss.remoting.transport.socket.ServerThread.readVersion(ServerThread.java:824)
  |         at 
org.jboss.remoting.transport.socket.ServerThread.processInvocation(ServerThread.java:510)
  |         at 
org.jboss.remoting.transport.socket.ServerThread.dorun(ServerThread.java:373)
  |         at 
org.jboss.remoting.transport.socket.ServerThread.run(ServerThread.java:166)
  | 

when the clientMaxPoolSize is increased up to 450, there are around 50 client 
threads that failes.
On the JMX consol the currentClientPoolSize value is 400 until the socket 
timeout delay has passed. Then the 400 server threads return on the pool.

The maxPoolSize + backlog is sufficient to accept the 500 thread connections. 
So I don't understand why method invokations failes when they waits in the 
backlog queue (or in the "accept thread"). When the client has finish, the 
server thread should release the connection and return in the pool. (but it 
isn't...why?)

What is the problem in my configuration ?
What is the good approach for managing "server side" bursts client connections ?
 
PS: When the number of concurrent client threads (and also clientMaxPoolThread) 
is greater than maxPoolSize + backlog (ie 550), the same SocketTimeoutException 
is thrown. However when it is lesser, there are no fails.


Thanks for your help.
Nicolas Medoc.

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4121240#4121240

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4121240
_______________________________________________
jboss-user mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/jboss-user

Reply via email to