Advertisement

Eclipse eating all my memory, then barfing all over

Started by May 30, 2008 06:57 AM
3 comments, last by 255 16 years, 6 months ago
So I decided to give Eclipse a try for Java development, since GEdit + command line started to get a bit cumbersome. Except that it's horribly slow, it seems to be a great IDE so far. Unfortunately though, it'll only run for a dozen recompilations or so, then it tells me the Java VM is out of memory and therefore can't create more threads, and then asks me if I want to exit. WTF is this, and does anybody know how to fix it? I'm running it under Debian testing, with a gig of RAM (no swap) and Java 6. If I can edit 5-6 images in the 1500x3000px size at the same time, Eclipse ought to be able to run for more than five minutes without killing itself.
Ram ram more ram!
And swap ofc, who does not use swap? Especially when having (only) a gig of ram.
(When linux runs out of ram it kills processes without care)

And manually activating garbage collection does not help?
Advertisement
I havn't tried it on linux, but maybe look into the command line args you're using. There's a whole bunch of them to control the max heap size and various other bits of behaviour to do with memory use and swapping. Maybe try a different build (the latest stable ones are usually good) to see if it's an issue with that particular build.

Failing that, the people in #eclipse are usually very helpful and knowledgeable.
Make sure your using Sun Java (or OpenJDK) and not GCJ (seems to act worse). Not sure if its still true but /etc/eclipse/java_home may have the wrong JVM in it. Also modifying the memory settings and other parameters in eclipse.ini can help also.
I had similar problems after installing lots of plugins, and the solution was to increase the heap size in eclipse.ini.

Here are my current settings:
-showsplash
org.eclipse.platform
-vmargs
-Xms128m
-Xmx512m
-XX:MaxPermSize=128m

This topic is closed to new replies.

Advertisement