File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Could not reserve enough space for object heap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Could not reserve enough space for object heap" Watch "Could not reserve enough space for object heap" New topic
Author

Could not reserve enough space for object heap

Nancy Dawson
Greenhorn

Joined: Sep 17, 2006
Posts: 13
I am having problem starting my tomcat , Pls the errors are

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

Joined: Aug 24, 2005
Posts: 518
First shutdown non-essential applications to free some memory.

If that doesn't work, look in the Tomcat conf directory and open the workers2.properties.

Under the [vm:] section, post the parameters so we can see how you've configured Tomcat.

Do you see a parameter like "OPT=-Xmn???M" ? Change the number to a smaller value and try starting Tomcat again.

(I'm assuming you are using Tomcat 5.5, if not the conf file may be different.)
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

How did you install Tomcat?
How do you start/stop Tomcat?



If that doesn't work, look in the Tomcat conf directory and open the workers2.properties.

Unless she's using a connector (For Apache HTTPD or IIS) she probably doesn't have a workers2.properties file.


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
Nancy Dawson
Greenhorn

Joined: Sep 17, 2006
Posts: 13
Originally posted by Ben Souther:
How did you install Tomcat?
How do you start/stop Tomcat?




Unless she's using a connector (For Apache HTTPD or IIS) she probably doesn't have a workers2.properties file.


I installed tomcat by unzipping the apache file i downloaded

I am starting tomcat by using ./startup.sh

Stopping by using ./shutdown.sh
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

OK, (with Windows, altering the heap settings is different depening on whether you've installed as a service or not), you're on *nix..

You can increase the heap space settings by adding the following line to your {tomcat install}/conf/catalina.sh file (in bold):


Xms is the initial heap size.
Xmx is the max heap size.

By default the JVM uses 64M which may not be enough for your app.
[ October 04, 2006: Message edited by: Ben Souther ]
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Also, does your machine have enough ram to run Tomcat?
Nancy Dawson
Greenhorn

Joined: Sep 17, 2006
Posts: 13
Originally posted by Ben Souther:
Also, does your machine have enough ram to run Tomcat?


Its a Red Hat Linux 4 with 256MB of Memory
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

That's not a lot.
Are you running XWindows too?

The free command will tell you what you've got available:


The -m switch will cause the output to be displayed in megabytes.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Could not reserve enough space for object heap