I have a following problem. When I try to raise memory for JVM in eclipse.ini
file, I always get Could not create Java Virtual Machine
exception.
My current memory settings are
-Xms1024m
-Xmx1024m
-Xmn256m
-Xss2m
And I would like to raise them to
-Xms2048m
-Xmx2048m
-Xmn512m
-Xss2m
I am running on 32-bit Java, JDK 1.6. I have a 64-bit machine with 12GB of memory. The reason I am not using a 64-bit Java is that we have encountered some problemes during develepment of our apps, so we switched back to 32-bit one.
Thanks a lot for advices.
EDIT
Ok, so here is my stack trace, it occurs when I try to run Eclipse. Also notice that I have Xms
parameter set only to 512M but it works when it's set to 1024M, but it seems too much for one (even big) web app.
The most common cause for the “Could not create the Java Virtual Machine” error is that Java doesn't have enough available memory on your system to launch the VM client.
For one thing, you should never set your Xms to the same amount as Xmx because this will effectively cause the garbage collector to never run until your Java VM memory is completely used up. Set Xmx to the maximum memory you want to allocate to the Java applications and VM, and Xms to the maximum amount of memory the VM should use without bothering too much to garbage collect. You may find this will solve your problem.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With