Uploaded image for project: 'JBoss Enterprise Application Platform 4 and 5'
  1. JBoss Enterprise Application Platform 4 and 5
  2. JBPAPP-5394

CLONE -Backport HHH-5300 to EAP to fix memory leak in QueryPlanCache

    XMLWordPrintable

    Details

    • Affects:
      Release Notes
    • Release Notes Text:
      Hide
      An issue with <literal>QueryPlanCache</literal> was discovered that caused a memory leak due to soft references held by the unbound <literal>SoftLimitMRUCache</literal>. The <literal>SoftLimitMRUCache</literal> eventually filled up until a major stop-the-world garbage collection was necessary to clean the <literal>SoftLimitMRUCache</literal> soft references.

      The solution involves constraining the amount of soft and strong unbound references held in the cache.
      Entries are evicted using an LRU policy, or by memory pressure from the GC in the case of soft references. Two configuration options are now available, which resolve the issue:

      hibernate.query.plan_cache_max_strong_references, which defaults to 128
      hibernate.query.plan_cache_max_soft_references, which defaults to 2048

      Users that want to emulate previous behavior, can set <classname>hibernate.query.plan_cache_max_soft_references</classname> to Integer.MAX_VALUE.
      Show
      An issue with <literal>QueryPlanCache</literal> was discovered that caused a memory leak due to soft references held by the unbound <literal>SoftLimitMRUCache</literal>. The <literal>SoftLimitMRUCache</literal> eventually filled up until a major stop-the-world garbage collection was necessary to clean the <literal>SoftLimitMRUCache</literal> soft references. The solution involves constraining the amount of soft and strong unbound references held in the cache. Entries are evicted using an LRU policy, or by memory pressure from the GC in the case of soft references. Two configuration options are now available, which resolve the issue: hibernate.query.plan_cache_max_strong_references, which defaults to 128 hibernate.query.plan_cache_max_soft_references, which defaults to 2048 Users that want to emulate previous behavior, can set <classname>hibernate.query.plan_cache_max_soft_references</classname> to Integer.MAX_VALUE.
    • Release Notes Docs Status:
      Documented as Resolved Issue
    • Docs QE Status:
      ASSIGNED

      Description

      Fix from http://opensource.atlassian.com/projects/hibernate/browse/HHH-5300 is required to avoid the memory leak in use of QueryPlanCache.

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

                • Assignee:
                  stliu Strong Liu
                  Reporter:
                  dstephan David Stephan
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: