Friday, February 1, 2013

Re: GWT 2.5 compiler is running out of memory

Which kind of OutOfMemory are you seeing?
Also, try to set <localWorkers> to some value lower than the number of cores/cpus of your system: if you don't set localWorkers, the gwt-maven-plugin will use the number of cores/cpus by default, and obviously parallelizing work increases the memory needs.

On Thursday, January 31, 2013 11:32:10 PM UTC+1, dhoffer wrote:
I've got a rather large GWT build using Maven and the gwt-maven-plugin and I'm getting out of memory errors building now.  I'm not sure what's changed, it used to take considerable memory but now its taking so much I can't build.  I'm running Windows 7 64 bit with 8GB RAM and using Java 7 64 bit to compile, here are some of my settings:

MAVEN_OPTS=-Xms128m -Xmx1024m -XX:MaxPermSize=256m

Then in the gwt-maven-plugin configuration I have <extraJvmArgs>-Xmx2048m -Xmx2048m -XX:MaxPermSize=512m</extraJvmArgs>

I've tried several combinations of values here with no luck...with these values...
- When I start the maven command line build the system has about 3GB of memory used
- When it it starts the GWT part of the build its at about 4GB used.
- The I have lots of rebind operations going on generating code...during this time it goes to about 5GB used.
- Then when it hits the permutations step this is where it breaks down...it very quickly goes to about 7.5 GB used.  Then I get out of memory errors and the build fails.

So there seems to be a couple of issues, first the GWT compiler doesn't seem to work within the -Xmx2048m value, I used to use -Xmx1024m and it does about the same thing...it uses a lot more memory than that...and then fails.  In this case it used 3.5 GB before it failed.  And secondly, I can't give GWT more memory because my system doesn't have more to give it...this was with almost all other programs closed...and it still failed.

Does anyone have an idea why my build might be using so much memory and how to limit this?

Btw, at the start of the permutation compile step sometimes it reports 6 permutations and sometimes 12...seems to have the same problem in both cases but I'm not sure why it sometimes has 12 and other times 6.

-Dave



--
You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-web-toolkit+unsubscribe@googlegroups.com.
To post to this group, send email to google-web-toolkit@googlegroups.com.
Visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

No comments:

Post a Comment