Linux – “Error occurred during initialization of VM” in linux server

heapspacejavalinux

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     shared    buffers     cached
Mem:     8192        226       7965          0          0          0
    -/+ buffers/cache:        226       7965
Swap:            0          0          0

How can I solve this problem.

Best Answer

This error can occur when ulimits are set. What's the output of ulimit -a?