"Failed to reserve enough space for the heap of the object" when running java -version

I know this is a general question / problem. I wonder where to start.

Running java on a Windows 2008 server, we have 65 GB of memory, and it shows 25 GB for free. (Currently a couple of guys are working with processes).

systeminfo | grep -i memory

shows:

  Total Physical Memory: 65, 536 MB
 Available Physical Memory: 26,512MB
 Virtual Memory: Max Size 69.630 MB
 Virtual Memory: Available 299 MB
 Virtual Memory: In Use: 69, 331 MB. 

Actually just wondering how I solve this problem.

  • Where to begin?
  • What does it mean that more virtual memory is used by physical memory, and why does Java not start?
  • Does java want to use virtual memory, not physical memory?

java -version

gives me:

Error occured during initialization of VM could not reserve enough space for object heap

More specific questions:

  • Why doesn't the JVM want to use free physical memory?
  • How much memory does the java command (e.g. java -version ) make if you don't specify Xms options?
  • Just assigning more virtual memory would be a good solution to the problem?
+4
source share
3 answers

As I discovered, when I had a similar problem (although with much less memory on the system - see I can’t start the 64-bit JVM on 64-bit Windows 7 with a large heap size ), on Windows, the JVM will try to allocate a continuous block of memory.

So, my bet is that although you have enough full memory, you do not have enough continuous memory.

0
source

I have the same problem. From the analysis, we found that the machine has a low swap space. Increase the swap space and check.

+2
source

At the very least, to view the java version version of java -Xmx64m -version this should show you the version if necessary. Then you can try increasing Xmx and see what value it fails with.

0
source

All Articles