How to resolve this : "Error occurred during initialization of VM; Could not reserve enough space for object heap"
I am trying to start my database serve开发者_运维技巧r 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!
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
.
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.
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
精彩评论