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

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

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.3.0.GA_CP10
    • 4.3.0.GA_CP08, 4.3.0.GA_CP09
    • Hibernate
    • None
    • Release Notes
    • 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.
    • Documented as Resolved Issue

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

            shaozliu Strong Liu(刘少壮) (Inactive)
            rhn-support-dstephan David Stephan
            Jared Morgan Jared Morgan (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: