I have a main application that works great when I run it with grails run-app, and I want to run it with grails run-war. But I always get a known tomcat error java.lang.OutOfMemoryError: PermGem spaceon any request right after launch.
Well, I know that I need to change the value PermSize, so I tried all the methods that I found after googling ( JAVA_OPTS, GRAILS_OPTSand grails.tomcat.jvmArgs), and now I have the following script:
export JAVA_OPTS="-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m"
export GRAILS_OPTS="-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m"
grails -Dgrails.tomcat.jvmArgs="-Xms256m -Xmx1024m -XX:PermSize=512m -XX:MaxPermSize=512m" run-war
but it doesn’t help. Still has java.lang.OutOfMemoryError: PermGen spaceon request.
What am I doing wrong? Is there any other way to configure PermSizefor Grails 2.0.1?
Update: I started ps -ef | grep javaand found that Grails really had my parameters, but then it started a new process, for tomcat, without parameters.
source
share