views:

560

answers:

2

I should first say that I'm pretty familiar with configuring Eclipses memory settings. I'm currently using a variant of one of the posted configurations:

... --launcher.XXMaxPermSize 256m -vmargs -Xms40m -Xmx512m -Xss2m -Djava.net.preferIPv4Stack=true -Dcom.sun.management.jmxremote

And according to JConsole and the internal heap monitor, Eclipse never gets close to running out of heap.

What it DOES do is crash constantly with OOMEs, like every 30-50 minutes. Sometimes it tells me there was an OOME, other times it just closes silently. Strangely, the OTHER eclipse instance that is running all the time (the J2EE version) has never crashed once, even with a lot more source files.

There's been once or twice where it's been a zombie process after the crash and I got to see its memory footprint - around 1.5gigs, well above what the heap monitor said it was using. So, what's the deal? Something leaking? I do notice that the number of active threads appears to constantly go up.

Anyone had this problem and fixed it?

+1  A: 

According to this site, the proper memory settings for Eclipse/Flex Builder is:

-Xms256m
-Xmx512m

Those are the mem settings I use for eclipse and it seems to work fine. Hope that helps.

OTisler
Those are heap settings, and as I said, it never runs out of heap.
Jason Maskell
I did change this after your suggestion and it seems to help quite a bit - perhaps the crash is fragmentation related.
Jason Maskell
Cool, glad it helped!
OTisler
A: 

Depending on the size and complexity of the project you may have to raise the memory given to FlexBuilder. You may try using different JVM. In case Flexbuidler won't start up then you probably give it too much memory.

There is no holy grail for this problem, but sharing my FlexBuilder.ini may help some:

-vm C:\Program Files\Java\jdk1.6.0_20\bin\javaw.exe

-vmargs -Xms1024m -Xmx1224m -XX:MaxPermSize=365m -XX:PermSize=256m -Djava.net.preferIPv4Stack=true

mark