6 Replies Latest reply on Jun 11, 2008 11:11 AM by Kevin Conner

    Memory Leak in Content Based Router

    Maurice Zeijen Master


      I may have found a memory leak in the Content Based Router in both JBoss ESB 4.2.1 and 4.3.

      I noticed the problem at my Job with a production JBoss ESB 4.2.1 CP2 because it regularly crashed because the memory run out. After doing some memory analysis I found that the problem was with the content based router.

      To reliably reproduce the problem I created a sample project using the simple_cbr sample. I made that project available for download. The link is at the end of this post. I also included an export from a memory analysis of a memory dump. In that dump you can clearly see that the org.drools.base.FireAllRulesRuleBaseUpdateListener objects are piling up. Because the problem is within Drools I am not sure if the problem is really in the ESB.

      The test environment is:
      Java 1.5 or 6.0
      JBoss 4.2.2 GA
      JBoss ESB 4.2.1 or 4.3
      Memory settings: -Xms256m -Xmx256m -XX:MaxPermSize=128m

      The memory leak sample project can be downloaded here: http://www.smies.com/downloads/jbossesb/memory_leak_cbr.zip

      Simply unpack the project within the sample/quickstarts directoy to make it work.