0

hi i am trying to statrt developping an existing fat gwt application, when i try to use mvn clean install to compile in order to start my super dev mode i get out of memory

OutOfMemoryError: Increase heap size or lower gwt.jjs.maxThreads

and when I increase the heap size linux kills the process because it consumes a lot of memory. i don't know how to decrease the memory usage of gwt, i am just a novice gwt dev and some help would be very appreciated, as i have look all over the internet but nothing helped me, i have spent more than a week, and i can't start dev any thing!!!! my computer has 8G in ram but i believe after os takes its part and some software i belive i remain with some 5G and it is not enough !

UPDATE

when i do this configuration in gwt-maven-plugin:

<extraJvmArgs>-Xms1G -Xmx4G -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>

i get

OutOfMemoryError: Increase heap size or lower gwt.jjs.maxThreads

but when i do

**<extraJvmArgs>-Xms1G -Xmx5G -Dgwt.jjs.permutationWorkerFactory=com.google.gwt.dev.ThreadedPermutationWorkerFactory</extraJvmArgs>**

i get exit code 137 of linux

achabahe
  • 2,445
  • 1
  • 12
  • 21
  • You can use the extraJvmArgs element. org.codehaus.mojo gwt-maven-plugin 2.2.0 -Xmx512M -Xss1024k -Dfoo=bar – Ashwin Golani Mar 20 '17 at 19:50
  • The error give you 2 hints: increase the heap size, and you already try it. And the second: lower *gwt.jjs.maxThreads*. Did yuo check this parameter and try to change it as suggested? – Mario Santini Mar 20 '17 at 19:50
  • yeah i lowerd it and it has only 1 worker – achabahe Mar 20 '17 at 19:52
  • Another thing you can do, is check how much memory is too much for your linux system. Could be not so high, so you can to increment this, have a look here: http://stackoverflow.com/questions/4651234/how-to-determine-the-process-memory-limit-in-linux – Mario Santini Mar 20 '17 at 19:52
  • http://stackoverflow.com/questions/5821045/gwt-maven-plugin-how-to-set-system-properties-for-the-gwtrun-goal-in-the-pom-x/5822929#5822929... See here – Ashwin Golani Mar 20 '17 at 19:54
  • Another part is to analyze your build and check why it need so much memory. It is expected? If not you should look inside the problem instead of increasing the used memory. If yes, and you can not handle updating your kernel or by your build parameters, you shuld check how to change your code to optimize the memory usage. – Mario Santini Mar 20 '17 at 19:56
  • 1
    @AshwinGolani I think it is a different issue. The OP is aware on how to increase the memory with maven, he just got the process killed by the linux kernel as was too big. – Mario Santini Mar 20 '17 at 19:58

0 Answers0