Uploaded image for project: 'JBoss BPMS Platform'
  1. JBoss BPMS Platform
  2. RHBPMS-4802

[GSS](6.4.x) InMemorySessionFactory has apparent memory leak

XMLWordPrintable

    • CR2
    • Workaround Exists
    • Hide

      use persistence (but this is not acceptable for the customer due to performance reason)

      Show
      use persistence (but this is not acceptable for the customer due to performance reason)
    • Hide

      Build a runtime manager with per-request and session caching enabled.
      repeatedly get a runtime, get its session, run some rules (making sure at least some fire), and then release the runtime. Do this maybe 100,000 times. Helps if you do this with multiple threads and rapidly so that the runtimemanager has to create a good number of concurrent sessions.

      Notice lots of RightTuple objects and session objects hanging off the sessionfactory

      Show
      Build a runtime manager with per-request and session caching enabled. repeatedly get a runtime, get its session, run some rules (making sure at least some fire), and then release the runtime. Do this maybe 100,000 times. Helps if you do this with multiple threads and rapidly so that the runtimemanager has to create a good number of concurrent sessions. Notice lots of RightTuple objects and session objects hanging off the sessionfactory
    • 2017 Week 28-29

      I'm running drools with a runtime manager creating using PerRequest strategy and SessionCache turned on. (I process a LOT of requests but I want each one to be isolated)

      The SessionCache properly gets rid of sessions that have hung around too long, which is great.

      But the InMemorySessionFactory keeps a copy of every session it ever created, which – it seems to me – impedes garbage collection of unneeded, old sessions.

      It's possible I'm just reading this wrong, but examinations of running code using VisualVM show a LOT of RightTuple objects hanging around, attached to sessions and their GC root appears to be the InMemorySessionFactory.

              swiderski.maciej Maciej Swiderski (Inactive)
              rhn-support-hmiura Hiroko Miura
              Dominik Hanak Dominik Hanak
              Dominik Hanak Dominik Hanak
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved: