Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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 can't start tomcat6 on my VPS (which has 256 MB, 512 MB burst and uses currently only 20MB of it). the log entry shows:

Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

i read that i can set the min and max heapsizes for the java with the -Xms and -Xmx what do i need to do that tomcat will pass these parameters to java when trying to start the service?

share|improve this question
ps -ef | grep tomcat should tell you if it's up, otherwise have a look in the /usr/share/tomcat6/logs files for anything obvious. – Decado Mar 15 '11 at 14:43
thank you. [root@mabulous bin]# ps -ef | grep tomcat root 13739 32480 0 17:44 pts/1 00:00:00 grep tomcat does that mean it's running? – Mat Mar 15 '11 at 14:44
you was right - there was an error, the java VM doesn't want to start - see my edited problem description – Mat Mar 15 '11 at 14:50
Mat, I think your question is now well-defined enough to be used in a Google search. Good luck! – Tom Purl Mar 15 '11 at 14:56
up vote 2 down vote accepted

edit /etc/default/tomcat6 and add in -Xms and -Xmx values to java opts there.

eg:- JAVA_OPTS=" -Xmx256m"

share|improve this answer
perfect - thanks. the actual path was /etc/tomcat6/tomcat6.conf – Mat Mar 15 '11 at 15:11

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.