Setting JVM args for grails run-war

19 / May / 2012 by Ankur Tripathi 0 comments

While working on my project using Grails 2.0.3, I was getting java.lang.OutOfMemoryError with grails run-war even when my JAVA_OPTS are set. Then while going through documentation and this thread i found how to set jvm args for grails run-war.

Just add this code in your BuildConfig.groovy and you are done.

 grails.tomcat.jvmArgs = ["-Xms256m", "-Xmx1024m"]

Cheers,
Ankur
ankur@intelligrape.com

FOUND THIS USEFUL? SHARE IT

Leave a comment -