开发者

"Error occurred during initialization of VM" in linux

I am trying to run java command in linux server it was running well but today when I tried to run java I got some error-

Error occurred during initialization of VM

Could not reserve enough space for object heap

Could not create the Java virtual machine.

my memory space is -

root@vps [~]# free -m
         total       used       free   
Mem:     8192        226        7965    
-/+ buf: 226         7965
Swap:    0           0          0

How can I solve this proble开发者_开发问答m?


The machine did not have enough memory at that time to service the JVM's request for memory to start the program. I expect that you have 8 Gb of memory in the machine and that you use a 64-bit JVM.

I would suggest you add some swap space to the system to let it handle spikes in memory usage, and then figure out where the spike came from.


Which VM are you using? What is the maximum memory size you are trying to use?

If you are using 32-bit JVM on Windows and you are using close to the maximum it can access on your system, it can be impacted by memory fragmentation. You may have a similar problem.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜