Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Cannot allocate heap space when 80% of RAM free (ec2 WIndows)

2947431May 18 2017 — edited May 18 2017

Hello everybody,

we have a Windows 2012 SP2 on an EC2 instance with 64GB. We are running around 8 Java applications and a lot of other non-Java applications as well. Task manager shows that 22% of the memory is used. We try to start Java applications with Xmx128M or even lower and we get "Cannot allocate heap space". How can that be?

I know that 22% may not represent the reality. It may be that more space has been allocated for (Java) applications... but still there is plenty of space free! And other non-java applications do start. Could that be a problem related to the way AWS EC2 instances distribute memory to the jvm? The jdk 8 installed is 64bit, although somebody had incorrectly installed a 32bit jdk at the beginning- now removed. Could it be, that some of the 32bit config (maybe in the registry) are interfering?

This is a very weird case... Any help or assumptions are appreciated

Kind regards,

K

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jun 15 2017
Added on May 18 2017
0 comments
564 views