Uploaded image for project: 'James Server'
  1. James Server
  2. JAMES-3026

OpenJPA memory leak

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.4.0
    • 3.5.0
    • jpa
    • None

    Description

      Initially, I got this error after running for about 1.5 days:

      21:53:38.455 [smtpserver-executor-82] ERROR o.a.j.p.n.BasicChannelUpstreamHandler - Unable to process request
       java.lang.OutOfMemoryError: GC overhead limit exceeded

      Try #1

      I added more memory with "-Xmx", but that only took a bit more hours to get out of memory.

      Try #2

      I checked the heap map and found:

      38,405 instances of "org.apache.openjpa.kernel.FinalizingBrokerImpl", loaded by "sun.misc.Launcher$AppClassLoader @ 0x6c041ee08" occupy 1,198,987,104 (91.22%) bytes. These instances are referenced from one instance of "java.util.concurrent.ConcurrentHashMap$Node[]", loaded by "<system class loader>"
      Keywords
       sun.misc.Launcher$AppClassLoader @ 0x6c041ee08
       java.util.concurrent.ConcurrentHashMap$Node[]
       org.apache.openjpa.kernel.FinalizingBrokerImpl
      

       
      Which lead me to this article http://chathuriwimalasena.blogspot.com/2014/06/best-practices-when-using-apache.html .

      In summary, before closing any connection, we should check if it contains an active transaction and roll it back.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              simonl Simon Levesque
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h
                  1h