Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Eclipse + GWT -> Out of memory in development mode

If I run my GWT application in eclipse in development mode and click around in the browser for some time, I always get an "out of memory" error in eclipse. My computer has 16 GB Ram, and there is never used more than 8GB.

I tried several config parameters. The VM-arguments in my Run configuration contain these parameters: "-Xms8192m -Xmx8192m"

Even in the eclipse.ini I tested several config parameters and now it looks like this:

--launcher.XXMaxPermSize
8192M
-showsplash
org.eclipse.platform
--launcher.XXMaxPermSize
8192m
--launcher.defaultAction
openFile
--launcher.appendVmargs
-vmargs
-Dosgi.requiredJavaVersion=1.6
-Xms8192m
-Xmx8192m

But I still get the error. Is there any way to prevent this?

like image 471
jan Avatar asked Aug 25 '13 15:08

jan


2 Answers

If the browser application is throwing the OutOfMemoryError, then you don't need to change the Eclipse settings (eclipse.ini), that's only for Eclipse itself (more memory, usually faster workbench).

To increase an app's memory (any Java app launched from Eclipse), go to the Run/Debug configurations... in the Run menu and set the VM arguments on the Arguments tab of the app's run config:

-Xms128M -Xmx1024M -XX:MaxPermSize=256M
like image 159
TWiStErRob Avatar answered Oct 22 '22 05:10

TWiStErRob


put this in vm arguments in your run configurations: -Xmx2048M -XX:MaxPermSize=512m

like image 42
Sebastian Avatar answered Oct 22 '22 06:10

Sebastian