2 Replies Latest reply on Nov 23, 2010 1:32 AM by destrzeslu

    3 sec waiting for open socket in JBoss 4.2.2

    destrzeslu

      Hi All

       

      I am not experienced with JBoss, unfortunately our project already hit deadline cutover - but we still can not solve issue with performance tests.

      Our application works on JBoss 4.2.2, we use webservices over http and DB access. (no other interactions, no iiop, no jms, no clusters).

      Our test client shows that it spends around 3 seconds on open socket on JBoss site.

      Currently we see that 3 test clients can run concurrently, but when we fork another client it waits for an socket.

       

      When I did a thread dump I found a few entries like:

       

      Thread: http-57.56.19.168-8080-4 : priority:5, demon:true, threadId:1231, threadState:WAITING, lockName:org.apache.tomcat.util.net.JIoEndpoint$Worker@1ee3510d

       

          java.lang.Object.wait(Native Method)
          java.lang.Object.wait(Object.java:474)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:415)
          org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:441)
          java.lang.Thread.run(Thread.java:595)

       

      Currently we use the default web container setup which is:

      <Connector port="8080" address="${jboss.bind.address}"
               maxThreads="250" maxHttpHeaderSize="8192"
               emptySessionPath="true" protocol="HTTP/1.1"
               enableLookups="false" redirectPort="8443" acceptCount="100"
               connectionTimeout="20000" disableUploadTimeout="true" />

       

      I apperciate any help/ideas which could help us solving the issue.

      Thanks in advance

       

      Best Regards

       

      Lukasz

        • 1. Re: 3 sec waiting for open socket in JBoss 4.2.2
          wdfink

          Do you test with client/server on the same system?

          Doy you check network latency?

          • 2. Re: 3 sec waiting for open socket in JBoss 4.2.2
            destrzeslu

            Currently they are not (server on linux, client on windows), but we tested it on windows box when both were in the same machine - the result is the same. I have checked the source of the method seen in the thread dump:

             

            453           private synchronized Socket await() {
              454  
              455               // Wait for the Connector to provide a new Socket   <- does it mean that the OS is not able to provide socket, or .....?
              456               while (!available) {
              457                   try {
              458                       wait();
              459                   } catch (InterruptedException e) {
              460                   }
              461               }