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

    • Bug
    • Resolution: Done
    • Major
    • EAP_EWP 5.1.1
    • None
    • 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
    • ASSIGNED

    Description

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

      Attachments

        Issue Links

          Activity

            People

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

              Dates

                Created:
                Updated:
                Resolved: