• Post Reply Bookmark Topic Watch Topic
  • New Topic

Cannot allocate heap space when 80% of RAM free  RSS feed

 
Konstantinos Pachopoulos
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello everybody,
we have a Windows 2012 SP2 on AWS with 64GB. We are running "plenty" of Java applications and others as well. Task manager shows that 22% of the memory is used. We try to start Java applications with Xmx128M or 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! Could that be a problem related to the way AWS EC2 instances distribute memory... BTW both jdk 8 installed are 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 helps or assumptions are appreciated

Kind regards,
Kostas
 
Campbell Ritchie
Marshal
Posts: 56578
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which version of Java® are you using? Have a look at this link about JVM ergonomics for Java8. you should find details for older versions from this recent post. I couldn't find anything about minimum permissible heap sizes; I think it said the that the minimum for -Xmx is 2MB.
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, I would ask how many is "plenty"?  There is a difference between 10 java applications, compared to say 1000 java applications.

Henry
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!