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

"InactivityMonitor Async Task" threads leaking

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • None
    • 5.6.0
    • JMS client, Transport
    • None

    Description

      -Have a multi-thread consumers running to consumer messages
      -Have Connection to have these :
      ActiveMQConnectionFactory connectionFactory = new ActiveMQConnectionFactory(brokerUrl);
      connectionFactory.setUseAsyncSend(false);
      connectionFactory.setDispatchAsync(false);
      connectionFactory.setAlwaysSessionAsync(false);
      connectionFactory.setAlwaysSyncSend(true);

      -Run the consumers for several hours and profile it
      -You will see there are threads with the name "InactivityMonitor Async Task" being spawning continuously

      This will cause the entire consumer system to slow down eventually due to thread context switching.

      Suggestion to fix: we should not put a limit on the number of "InactivityMonitor Async Task" threads to be Max Integer. There is a bug in Java lib that
      it will not stop a thread after a given idle time-to-live. We could fix this in the file InactivityMonitor.java

      Attachments

        1. threadleak.png
          115 kB
          Minh Do

        Activity

          People

            Unassigned Unassigned
            timiblossom Minh Do
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified