freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ashwini kuntamukkala (JIRA)" <>
Subject [jira] [Created] (FREEMARKER-32) Memory Leak
Date Thu, 25 Aug 2016 19:41:21 GMT
ashwini kuntamukkala created FREEMARKER-32:

             Summary: Memory Leak
                 Key: FREEMARKER-32
             Project: Apache Freemarker
          Issue Type: Bug
          Components: engine
    Affects Versions: 2.3.23
         Environment: Linux, JDK 1.8
            Reporter: ashwini kuntamukkala

When processing over 2000 calls to hydrate a freemarker template with supplied pojos, the
app server hosting the web app goes out of memory. When I looked at the head dump, the freemarker.template.DefaultObjectWrapper's
classInstrospector instance of freemarker.ext.beans.ClassIntrospector  seems to holding on
to instance of pojos apparently in a hashmap. 

freemarker.ext.beans.ClassIntrospector  -->  java.util.concurrent.ConcurrentHashMap -->

I am initializing the set up in this way once when the application boots up

cfg = new Configuration(new Version(2, 3, 23));

So during a burst of calls, I run out of 512M of PermGenSize on my JVM. 

Is there a workaround to solve this problem?

Thank you

This message was sent by Atlassian JIRA

View raw message