Uploaded image for project: 'WildFly'
  1. WildFly
  2. WFLY-12671

Memory Leak of PersistenceUnitMetadataImpl

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 17.0.1.Final
    • JPA / Hibernate
    • None

      After updating from Wildfly 13 to Wildfly 17 we noticed a slowdown of our application after multiple deployments to the application server without restarting it between the deployments. Heapdumps are showing that after redeployment the number of PersistenceUnitMetadataImpl are growing (see screenshots).

      We are deploying 2 ear files and 2 war files. Only one ear has a database connection configured. We are using the bundeled hibernate version of Wildfly 17.
      The ear structure is like the following:

      - app.ear
        |
        |- META-INF
        |
        |- lib
        |   |
        |   |- all dependencies
        |
        |- own jars and wars (e.g. jpa)
      

      Since I failed to create a reproducing project for this behaviour I added some trace logging (Patch attached). The only difference I noticed was that sometimes the Stopping Persistence Unit logstatement is missing before the Stopped subdeployment logstatement.

        1. jcaleakmarlow.txt
          3 kB
          Scott Marlow
        2. memory leak after 4 deployments.PNG
          15 kB
          Robin Schimpf
        3. memory leak after 5 deployments.PNG
          18 kB
          Robin Schimpf
        4. memory leak with directory scanner undeploy and deploy.PNG
          63 kB
          Robin Schimpf
        5. persistence-unit-not-stopped.txt
          4 kB
          Robin Schimpf
        6. persistence-unit-stopped.txt
          4 kB
          Robin Schimpf
        7. Trying_to_catch_memory_leak_with_more_trace_logging.patch
          2 kB
          Robin Schimpf

              smarlow1@redhat.com Scott Marlow
              rschimpf Robin Schimpf (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: