Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
What are the -Xmx and -Xms parameters that you start your JVM with? – Dabu Jun 29 '11 at 7:14

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

share|improve this answer
up vote 0 down vote accepted

Restart(reboot) system or server it will work well.

share|improve this answer
Are you serious? Rebooting is a temporal solution imo. – Lucas Kauffman Jul 20 '12 at 18:25
Glad you resolved this issue. Please be sure to mark your answer as "accepted" when you are able. – jscott Jul 23 '12 at 18:24

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.