Uploaded image for project: 'ActiveMQ Classic'
  1. ActiveMQ Classic
  2. AMQ-5790

Huge number of TIME_WAIT connections observed while using activemq resource adapter with EAP6

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.9.0, 5.11.0
    • 5.16.0
    • Broker, RAR
    • None
    • ALL

    Description

      • While using activemq resource adapter (activemq-rar-5.9.0.rar or higher) on JBoss EAP 6.3 side it can be noticed that thousand of TIME_WAIT tcp connections are getting created every 2-3 minutes interval. These TIME_WAIT sockets are fluctuating from thousand (like 2000-3000) to 1 in every 2-3 minutes of interval.

      Following are the steps to reproduce this issue:

      Step-1). Configure AMQ broker to listen on "61621" then start it.

      Step-2). Deploy the "activemq-rar.rar" (5.9 vesion) to standalone instance of JBoss EAP 6.3 and use the attached "standalone-full.xml" file to start the EAP6.3 as ot has the resource-adapter configuration in it.

          cd jboss-eap-6.3.0/bin
         ./standalone.sh -c standalone-full.xml
      

      Step-3). Deploy the a simple MDB based application like an EAR containing around 20 MDBs listening to 20 different queues present on the A-MQ side. All these MDBs are very simple MDBs and just displays the received TextMessages. These MDBs have the following annotations in it (see maxSessions = 1).

      @MessageDriven(activationConfig={@javax.ejb.ActivationConfigProperty(propertyName="destination", propertyValue="java:/jms/queue1/1.0"), @javax.ejb.ActivationConfigProperty(propertyName="useJndi", propertyValue="true"), @javax.ejb.ActivationConfigProperty(propertyName="destinationType", propertyValue="javax.jms.Queue"), @javax.ejb.ActivationConfigProperty(propertyName="acknowledgeMode", propertyValue="Auto-acknowledge"), @javax.ejb.ActivationConfigProperty(propertyName="maximumRedeliveries", propertyValue="6"), @javax.ejb.ActivationConfigProperty(propertyName="initialRedeliveryDelay", propertyValue="5000"), @javax.ejb.ActivationConfigProperty(propertyName="maxSessions", propertyValue="1")})
      
      .
      .
          public void onMessage(Message message) {
              TextMessage textMessage = (TextMessage) message;
              try {
                  log.info("SimpleMdb1 received a message" + textMessage.getText());
              }
              catch (JMSException e) {
                  log.info("Error in SimpleMdb1 while received a message");
              }
          }
      

      Step-4). Execute the following command and notice around thousand TCP connections as following:

       netstat -tnlpa | grep TIME_WAIT | grep 61621  
      ----------------------------------
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:39199         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:39461         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:39935         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:38999         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:39139         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:39922         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:40027         TIME_WAIT   -                   
      tcp6       0      0 127.0.0.1:61621         127.0.0.1:38908         TIME_WAIT   - 
      

      Attachments

        Issue Links

          Activity

            People

              gtully Gary Tully
              jaysensharma Jay SenSharma
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: