Uploaded image for project: 'Infinispan'
  1. Infinispan
  2. ISPN-15066

Memory leak in PutFromLoadValidator when used for hibernate natural id cache

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Major
    • None
    • 13.0.8.Final
    • Hibernate Cache
    • None

    Description

      We use infinispan as our hibernate cache provider in a large scale clustered web app (servicing thousands of HTTP requests per second) and have been doing so for a number of years.

      We only recently introduced a natural id cache for one hibernate entity type that is very heavily used in our system.  Since doing so we observe a steady memory leak in the JVM Old Gen heap - it changes as our load changes throughout the day but roughly gigabyte every 4 hours.

      We took a heap dump and upon inspecting it appears the suspect is the pendingPuts map in the PutFromLoadValidator.  We see it retaining thousands of references to hibernate sessions (in the nested PendingPutMap data structure) that have long since been closed.  Unfortunately despite the sessions being closed they still retain a reference to old database connections, which each have non trivial amounts of memory allocated for statement caches and the like.

       

      Attachments

        Activity

          People

            wburns@redhat.com Will Burns
            dmaplesden David Maplesden (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: