I created a small application in Groovy / Grails that uses Quartz to do a small job every 10 seconds. Now I have a problem that after several hours of work, the application crashes with org.quartz.JobExecutionException: java.lang.OutOfMemoryError: Java heap space [See nested exception: java.lang.OutOfMemoryError: Java heap space].
Now I am trying to find the cause of this problem using Eclipse Memory Analyzer . Finding the "problem suspects", the analyzer shows this result:
Problem Suspect 1
3,926 instances of "groovy.lang.ExpandoMetaClass",
loaded by "org.codehaus.groovy.grails.cli.support.GrailsRootLoader @ 0x122e88b98"
occupy 95,746,168 (33.69%) bytes.
Keywords
org.codehaus.groovy.grails.cli.support.GrailsRootLoader @ 0x122e88b98
groovy.lang.ExpandoMetaClass
--
Problem Suspect 2
1,010 instances of "com.mongodb.DBApiLayer",
loaded by "org.codehaus.groovy.grails.cli.support.GrailsRootLoader @ 0x122e88b98"
occupy 56,522,416 (19.89%) bytes.
These instances are referenced from one instance of
"org.codehaus.groovy.util.AbstractConcurrentMapBase$Segment[]", loaded by
"org.codehaus.groovy.grails.cli.support.GrailsRootLoader @ 0x122e88b98"
Keywords
org.codehaus.groovy.grails.cli.support.GrailsRootLoader @ 0x122e88b98
org.codehaus.groovy.util.AbstractConcurrentMapBase$Segment[]
com.mongodb.DBApiLayer
Is it normal to have many instances ExpandoMetaClassin a Groovy (and Grails) application, or maybe there is a problem that I presented?
MongoDB: GORM Gmongo. , , . 40. , . , . ?
?