This Question is Possibly Answered

1 "correct" answer available (4 pts) 2 "helpful" answers available (2 pts)
4 Replies Last post: Oct 22, 2007 8:42 PM by jeb  
Tim Niblett Newbie 1 posts since
Sep 6, 2003
Currently Being Moderated

Oct 22, 2007 12:53 PM

Getting only 256MB heap for Grails

Even when I set the heap to -Xmx1024m there is still a -Xmx256m in the Grails command line, and I'm running out of memory.  I can't see where this gets set.  I'm running the Idea 7.0 (build 7361 I think) and JetGroovy 0.1.11732.  The command line I get is:

 

"C:\Program Files\Java\jdk1.6.0\bin\java" -classic -Xmx1024m -ea -Xmx256M -Dgrails.home=C:\java\grails -Dbase.dir=C:\work\software\java\grails "-Dtools.jar=C:\Program Files\JetBrains\IntelliJ IDEA 7.0\jre\lib\tools.jar" -Dgroovy.starter.conf=C:\java\grails/conf/groovy-starter.conf -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:1900,suspend=y,server=n -Dfile.encoding=windows-1252 -classpath "C:\java\grails\lib\groovy-all-1.1-rc-1.jar;C:\Program Files\JetBrains\IntelliJ IDEA 7.0\lib\idea_rt.jar" org.codehaus.groovy.tools.GroovyStarter --main org.codehaus.groovy.grails.cli.GrailsScriptRunner --conf C:\java\grails/conf/groovy-starter.conf --classpath C:\java\grails\lib\groovy-all-1.1-rc-1.jar;. run-app

 

I don't want the -classic or the -Xmx256M

Randall Schulz Apprentice 1,020 posts since
Nov 17, 2006
Currently Being Moderated
Oct 22, 2007 10:05 PM in response to: Tim Niblett
Re: Getting only 256MB heap for Grails

D'Oh!

 

Totally irrelevant reply removed...

 

RRS

 

Message was edited by:

        Randall Schulz

Ilya Sergey JetBrains 255 posts since
Sep 11, 2007
Currently Being Moderated
Oct 22, 2007 7:52 PM in response to: Tim Niblett
Re: Getting only 256MB heap for Grails

Yes, this heap size (256M) is hard-coded in JetGroovy run configuration for Grails. We'll add a possibility to change it by command line soon.

Ilya Sergey JetBrains 255 posts since
Sep 11, 2007
Currently Being Moderated
Oct 22, 2007 8:04 PM in response to: Tim Niblett
Re: Getting only 256MB heap for Grails

So, it will be possible to change heap size in Grails Run configuration in next JetGroovy build.

Could you say, what other parameters do you like to be customizable in run configuration? E.g. Grails/ home path, project base directory etc...

jeb Newbie 6 posts since
Jul 11, 2007
Currently Being Moderated
Oct 22, 2007 8:42 PM in response to: Ilya Sergey
Re: Getting only 256MB heap for Grails

I suggest making it work like the startGrails scripts in the Grails distribution.  On Linux, "-server -Xmx256M" is prepended to JAVA_OPTS to provide fallback defaults.  On Windows, it appears that JAVA_OPTS is set to "-Xmx128M" if not already set, though I would guess that the Linux defaults would work as well.  The VM options in the run config could be treated like JAVA_OPTS in the Grails scripts.  The various path definitions (base.dir, etc) are already set from the plugin and module information, which I think should remain as-is.  I don't think they have any other meaningful values for a Grails project.

More Like This

  • Retrieving data ...