{"id":5596,"date":"2012-05-19T13:45:21","date_gmt":"2012-05-19T08:15:21","guid":{"rendered":"http:\/\/www.tothenew.com\/blog\/?p=5596"},"modified":"2012-06-29T14:43:00","modified_gmt":"2012-06-29T09:13:00","slug":"setting-jvm-args-for-grails-run-war","status":"publish","type":"post","link":"https:\/\/www.tothenew.com\/blog\/setting-jvm-args-for-grails-run-war\/","title":{"rendered":"Setting JVM args for grails run-war"},"content":{"rendered":"<p style='padding-bottom:10px'>\nWhile working on my project using Grails 2.0.3, I was getting java.lang.OutOfMemoryError with  <a href=\"http:\/\/grails.org\/doc\/2.0.x\/ref\/Command%20Line\/run-war.html\">grails run-war<\/a> even when my JAVA_OPTS are set. Then while going through <a href=\"http:\/\/grails.org\/doc\/2.0.x\/ref\/Command%20Line\/run-war.html\">documentation<\/a> and <a href=\"http:\/\/stackoverflow.com\/questions\/10314400\/grails-2-0-permgem-space-with-run-war\">this thread<\/a> i found how to set jvm args for <a href=\"http:\/\/grails.org\/doc\/2.0.x\/ref\/Command%20Line\/run-war.html\">grails run-war<\/a>.<\/p>\n<p>Just add this code in your BuildConfig.groovy and you are done.<br \/>\n[code] grails.tomcat.jvmArgs = [&quot;-Xms256m&quot;, &quot;-Xmx1024m&quot;][\/code]<\/p>\n<p style='padding-top:10px'>\nCheers,<br \/>\nAnkur<br \/>\nankur@intelligrape.com<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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. [code] grails.tomcat.jvmArgs = [&quot;-Xms256m&quot;, &quot;-Xmx1024m&quot;][\/code] [&hellip;]<\/p>\n","protected":false},"author":24,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":21},"categories":[7],"tags":[4840,842,841],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5596"}],"collection":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/users\/24"}],"replies":[{"embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/comments?post=5596"}],"version-history":[{"count":0,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/posts\/5596\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/media?parent=5596"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/categories?post=5596"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.tothenew.com\/blog\/wp-json\/wp\/v2\/tags?post=5596"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}