简体   繁体   English

解决方法:“ VM初始化期间发生错误; 无法为对象堆保留足够的空间”

[英]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 server from command prompt in Windows. 我正在尝试从Windows中的命令提示符启动数据库服务器。 But I receive the following error: 但是我收到以下错误:

Error occurred during initialization of VM 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). 我认为这是由于计算机中的内存不足(1GB)。

How can I resolve this issue? 我该如何解决这个问题?

Please retag if I have tagged it wrong. 如果我标记错了,请重新标记。 Thanks! 谢谢!

Try changing the memory settings of the VM. 尝试更改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. 但是,如果您的计算机没有足够的RAM来处理此问题,则唯一的解决方法是购买更多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 . 通过调整上面的设置,仍然可以使它运行-我曾经花半个小时尝试通过对XmxMaxPermSize不同值进行试验来运行内存有限的应用程序。

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 org.gradle.jvmargs = -Xmx1536m到org.gradle.jvmargs = -Xmx512m

Try giving the JVM an extra argument: 尝试给JVM一个额外的参数:

-mX256M

Despite the gigabyte of RAM in your machine, Java is only given a small chunk (64mb?) to play with. 尽管您的计算机中有GB的RAM,但Java只能使用一小块(64mb?)来使用。 This argument allocates even more memory to the process. 此参数为进程分配更多的内存。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 VM初始化期间发生错误; 无法为对象堆保留足够的空间; 无法创建Java虚拟机 - Error occurred during initialization of VM; Could not reserve enough space for object heap; Could not create the Java virtual machine VM 初始化过程中发生错误 无法为对象堆保留足够的空间 无法创建 Java 虚拟机 - Error occurred during initialization of VM Could not reserve enough space for object heap Could not create the Java virtual machine “虚拟机初始化时出错; 无法为对象堆保留足够的空间”使用 -Xmx3G - “Error occurred during initialization of VM; Could not reserve enough space for object heap” using -Xmx3G VM 初始化时出错 无法为 object 堆 Android Studio 保留足够的空间 - Error occurred during initialization of VM Could not reserve enough space for object heap Android Studio 初始化 VM 时出错,无法为 object 堆预留足够的空间 - Error occurred during initialization of VM, Could not reserve enough space for object heap VM初始化期间发生错误,无法为对象堆保留足够的空间 - Error occurred during initialization of VM Could not reserve enough space for object heap “ VM初始化期间发生错误,无法为1048576KB对象堆保留足够的空间” - “Error occurred during initialization of VM Could not reserve enough space for 1048576KB object heap” VM初始化期间发生Java错误无法为对象堆保留足够的空间 - Java Error occurred during initialization of VM Could not reserve enough space for object heap 初始化VM时出错,无法为对象堆保留足够的空间 - Spring Tool Suite? - Error occured during initialization of VM, Could not reserve enough space for object heap - Spring Tool Suite? VM初始化期间发生错误:无法为对象堆保留足够的空间 - Error occured during initialization of VM: Could not reserve enough space for object heap
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM