Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    com.isomorphic.log.RevolvingMemoryAppender memory leak

    I am using 3.1-p20130910

    I have an application for which I was experiencing a memory leak that caused me run out of memory after running it for about an hour. I finally purchased a product called Plumbr (www.plumbr.eu). After 15 minutes of analysis if found a memory leak in the Isomorphic server code. Here is the report I received from Plumbr:

    Code:
    Currently 242 leaked objects exist of class
    com.isomorphic.log.LogEntry
    
    The objects are created at 
    com.isomorphic.log.RevolvingMemoryAppender.append(org.apache.log4j.spi.LoggingEvent):81
    
    and are being held
    in elementData of java.util.ArrayList
    in list of java.util.Collections$SynchronizedRandomAccessList
    in value of org.apache.commons.collections.map.AbstractLinkedMap$LinkEntry
    in data of org.apache.commons.collections.map.LinkedMap
    in logs of com.isomorphic.log.RevolvingMemoryAppender
    in com.isomorphic.log.RevolvingMemoryAppender
    in elementData of java.util.Vector
    in appenderList of org.apache.log4j.helpers.AppenderAttachableImpl
    in aai of org.apache.log4j.Logger
    in parent of org.apache.log4j.Logger
    in value of java.util.Hashtable$Entry
    in table of java.util.Hashtable
    in ht of org.apache.log4j.Hierarchy
    in repository of org.apache.log4j.spi.DefaultRepositorySelector
    in repositorySelector of org.apache.log4j.LogManager
    in elementData of java.util.Vector
    in classes of sun.misc.Launcher$AppClassLoader
    in other kind of root reference (please let us know if you see this)

    #2
    An automated tool that knows that an object has been leaked is pretty amazing. How does it know that the system will never access that object again? :)

    The fact that RevolvingMemoryAppender has a bunch of LogEntry objects is not a leak - the whole point of this class is to hold up to "maxEntries" LogEntry objects. The value of maxEntries can be configured in log4j.isc.config.xml and we ship with a default of 500.

    This report also doesn't pass the "sniff test" that applications using this subsystem have been left running for months under load without running out of memory.

    Comment

    Working...
    X