4 Replies Latest reply on Jan 7, 2010 10:27 PM by jimyliu

    AJP connection pile up with CLOSE_WAIT status

    jimyliu

      Hi,

       

      We have a web server(apache 2.0.52, mod_jk/1.2.28) on Red Hat Linux, connect with JBoss (JBoss [Trinity] 4.2.3.GA). After the server ran for few hours, all the AJP connections piled up with CLOSE_WAIT status. At the same time, the JBoss threads also increased.  Finally, the apache server response status 503 "service unavailable". I got the thread dump, most threads are like this:

       

       

      "ajp-0.0.0.0-8113-93" daemon prio=1 tid=0x0000002bc6be0680 nid=0x4aab in Object.wait() [0x000000004ba08000..0x000000004ba08e30]

      at java.lang.Object.wait(Native Method)

      - waiting on <0x0000002ac6e7d918> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)

      at java.lang.Object.wait(Object.java:474)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.await(JIoEndpoint.java:415)

      - locked <0x0000002ac6e7d918> (a org.apache.tomcat.util.net.JIoEndpoint$Worker)

      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:441)

      at java.lang.Thread.run(Thread.java:595)

       

       

      If we restart JBoss, the site can run for a while. Then the problem would happen again while the AJP connections pile up.

       

      This is workers.properties file:

      worker.node2.port=8113

      worker.node2.host=potato

      worker.node2.cachesize=100

      worker.node2.type=ajp13

      worker.node2.connection_pool_timeout=300

      worker.node2.connect_timeout=5000

      worker.node2.prepost_timeout=5000

      worker.node2.socket_timeout=10

      worker.node2.socket_keepalive=True

      worker.list=node2

      server.xml in JBoss:
      <Connector port="8113" address="${jboss.bind.address}" protocol="AJP/1.3"
               emptySessionPath="false" enableLookups="false" redirectPort="8111"
               maxThreads="600" connectionTimeout="300000"/>
      Any suggestion to resolve this issue ? Thanks,
      Jimy