0
votes

I am trying to start my database server from command prompt in Windows. But I receive the following error:

Error occurred during initialization of VM

Could not reserve enough space for object heap

However the attempt is successful if I log off and log on again or restart. I think it is because of insufficient RAM in my computer (1GB).

How can I resolve this issue?

Please retag if I have tagged it wrong. Thanks!

3
Java needs continuous address space/block to be reserved. If such a block can not be allocated by the system you get the above error.bestsss

3 Answers

3
votes

Try changing the memory settings of the VM. see here how to pass this as command-line arguments. For example

java -Xmx512m -Xms256m ....

If, however, your machines does not have enough RAM to handle this, the only resolution is to buy more RAM. It might still be possible to make it run with tweaking the above settings - I once spent half an hour trying to run an application with a limited amount of RAM by experimenting with different values for Xmx and MaxPermSize.

0
votes

Try giving the JVM an extra argument:

-mX256M

Despite the gigabyte of RAM in your machine, Java is only given a small chunk (64mb?) to play with. This argument allocates even more memory to the process.

0
votes

I got the same error and resolved it by changing values in grade settings file of project

org.gradle.jvmargs=-Xmx1536m to org.gradle.jvmargs=-Xmx512m