Uploaded image for project: 'CXF'
  1. CXF
  2. CXF-8161

Memory Leak/Thread Leak in JMSDestination & PollingMessageListenerContainer

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.2.11, 3.3.4
    • 3.3.5, 3.2.12, 3.4.0
    • JMS
    • None
    • Unknown

    Description

      Hi,

      when you create a JMS-Endpoint with concurrentConsumers > 1, PollingMessageListenerContainer starts a ThreadPoolExecutor running concurrentConsumers instances of the class PollingMessageListenerContainer#Poller (or XAPoller)

      If a exception from the jms-connection occurs, each Poller instance triggers JMSDestination#restartConnection, so JMSDestination creates concurrentConsumers PollingMessageListenerContainer with concurrentConsumers*concurrentConsumers Poller instances and threads and jms-consumers (for each Exception).

      If you have concurrentConsumers set to 10, first exception causes 100 threads, next exception 1000 etc.

      Also is PollingMessageListenerContainer#stop not working, because in case of an Exception first the running-Flag in PollingMessageListenerContainer will be set to false. This causes old ThreadPools not to be cleaned up, the ThreadPools stay alive.

      The Garbage Collector cann't clean up old instances of PollingMessageListenerContainer and Poller.

      I think this Bug relates to CXF-7197

       

       

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              Christian Steiner Christian Steiner
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m