What is the simplest way to fix the Out Of Memory Perm Size of GWT running in eclipse Juno?

StackOverflow https://stackoverflow.com/questions/21781675

  •  11-10-2022
  •  | 
  •  

Question

When running my Gwt app in eclipse environment & especially when refreshing the page I often have either "Out Of Memory Perm Size" problem or the page took very long time to load & finally die out.

Some instructions from other questions are not very clear & each person produces a different solution to set memory, which made me really confused.

Here is my eclipse.ini file in C:\eclipse-jee-juno-SR1-win32-x86_64\eclipse:

-clean
-startup
plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
--launcher.library
plugins/org.eclipse.equinox.launcher.win32.win32.x86_64_1.1.200.v20120522-1813
-product
org.eclipse.epp.package.jee.product
--launcher.defaultAction
openFile
--launcher.XXMaxPermSize
256M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
256m
--launcher.defaultAction
openFile
-vmargs
-Dosgi.requiredJavaVersion=1.5
-Dhelp.lucene.tokenizer=standard
-Xms40m
-Xmx512m

Also, in my eclipse, Run--> Debug Configurations --> Arguments tab --> I saw

VM arguments: -Xmx2048m // this is quite high number why it still very slow??

I need the simplest way to fix it. so What is the simplest way to fix this problem?

Was it helpful?

Solution

Start up Visual VM and see what each generation of memory is doing.

I would focus on the perm gen. You can increase its setting like this:

-Xms256m -Xmx512m -XX:MaxPermSize=256m

You'd better be running on a 64-bit operating system. The 32 bit JVM won't allow max heap larger than 1.2-1.5MB.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top