Was working on to resolve one of the issues that our production server was getting while running Grails based application which uses org.codehaus.groovy.grails.
Actually it turned out to be a very serious issue. when we digged into the issue and found that while creating dynamic classes by compiling the templates, it keeps on using more and more memory if there are many requests comming to the application (no matter how fast/slow) which uses org.codehaus.groovy.grails.
After sometime it used to full whole our PermGen space (1 GB as well very easily under load) causing application to stop responding any further requests.
That forced us to go through the Grails code and luckily we were able to resolve the issue.
We have created Grails Jiras for the same as provided link below: