Uploaded image for project: 'Fedora Repository Project'
  1. Fedora Repository Project
  2. FCREPO-2540

Possible memory leak in org.fcrepo.event.serializer.JsonLDSerializer

    Details

    • Type: Bug
    • Status: Open
    • Priority: Critical
    • Resolution: Unresolved
    • Affects Version/s: Fedora 4.7.0
    • Fix Version/s: None
    • Component/s: f4-messaging
    • Labels:
      None
    • Roadmap Theme:
      Scalability/Performance

      Description

      Analysis of the heap dumps during a load process that created 7000+ objects in the repository demonstrated a possible memory leak in the org.fcrepo.event.serializer.JsonLDSerializer class.

      The ObjectMapper used by that class is accumulating what looks like a Jackson JSON Deserializer and Serializer object for each event created by fcrepo. These objects are each about 1MB in size, but are never cleared out of the ObjectMapper. This lead to the ObjectMapper retaining approximately 456MB of heap space during the load process. See [^jsonldserializer-memory.csv] for the tracking of that growth across the 4 heap dumps. Heap dump 1 occurred about 7 minutes after the start of the load, and heap dump 4 is just after then conclusion of the load.

      See [^memory-analysis-20170721T105651.png] for a screenshot of the top dominator objects from the fourth heap dump.

      Original fedora-tech thread: https://groups.google.com/d/topic/fedora-tech/oAwFFHaRu8Q/discussion

        Attachments

        1. 4.7.0.png
          115 kB
          Aaron Birkland
        2. 4.7.4-SNAPSHOT.png
          112 kB
          Aaron Birkland
        3. jsonldserializer-memory.csv
          0.3 kB
          Peter Eichman
        4. memory-analysis- 20170721T105651.png
          97 kB
          Peter Eichman
        5. test.sh
          0.2 kB
          Aaron Birkland

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              peichman-umd Peter Eichman
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: