Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2008

Tip: Looking for answers? Try searching our database.

"Error occurred during initialization of VM" Error Message

Thread view: 
Hugo - 01 Apr 2008 18:54 GMT
Hi:

I am receiving the following error message when I shutdown Tomcat:

"Error occurred during initialization of VM
Could not reserve enough space for object heap"

The server has 4GB of RAM and the Tomcat has been set to claim upto
2GB of memory.

Any clues on why this message is being received?
Steve W. Jackson - 01 Apr 2008 19:19 GMT
In article
<71d45ce6-2318-4b0d-8239-ae9f4ed5ba98@b5g2000pri.googlegroups.com>,

> Hi:
>
[quoted text clipped - 7 lines]
>
> Any clues on why this message is being received?

The amount of RAM the server has isn't relevant, it's the amount you try
to allocate to the JVM's heap.  You don't say what platform, but Java
can't get a full 2GB on most platforms.  On Windows, it's something in
the area of 1600 MB or thereabouts.
Signature

Steve W. Jackson
Montgomery, Alabama

Hugo - 01 Apr 2008 19:25 GMT
On Apr 1, 11:19 am, "Steve W. Jackson" <stevewjack...@knology.net>
wrote:
> In article
> <71d45ce6-2318-4b0d-8239-ae9f4ed5b...@b5g2000pri.googlegroups.com>,
[quoted text clipped - 18 lines]
> Steve W. Jackson
> Montgomery, Alabama

Hi:

I am using a Sun V240 with Solaris 9.0 as the operating system.

Is there a spec document on Sun's website which shows the maximum
memory Java can claim on various OS? I could not find the data via
Googling.

Thanks.
Nigel Wade - 02 Apr 2008 09:48 GMT
> On Apr 1, 11:19 am, "Steve W. Jackson" <stevewjack...@knology.net>
> wrote:
[quoted text clipped - 28 lines]
> memory Java can claim on various OS? I could not find the data via
> Googling.

It won't be on the Sun Java site, it's an OS feature not a JVM feature. If it's
32bit Solaris I don't know what the maximum vm is that you can allocate to a
process, probably 4GB.

Besides the overriding OS limitation, there are also limits set by your system
administrator. These are defined by ulimit. You may need to modify ulimit for
the Tomcat process to allow it to allocate more virtual memory space. You can
test it from the command line by running:
$ java -Xmx2G -version
it will fail until you set the correct ulimit value.

E.g. on my system:
$ ulimit -S -v 2000000
$ java -Xmx2G -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

$ ulimit -S -v 3000000
$ java -Xmx2G -version
java version "1.6.0_01"
...

To increase your ulimit above the hard limit you will need root access.

Signature

Nigel Wade

Manish Pandit - 01 Apr 2008 19:23 GMT
> Hi:
>
[quoted text clipped - 7 lines]
>
> Any clues on why this message is being received?

Are you using windows? Then this link may help : http://support.microsoft.com/kb/924054

Also, try reducing it from 2GB to 1GB and retry.

-cheers,
Manish
Hugo - 01 Apr 2008 19:28 GMT
> > Hi:
>
[quoted text clipped - 14 lines]
> -cheers,
> Manish

The JVM is on a Sun V240 server with Solaris 9.0.

I am currently using 1GB; I would like to increase the memory
available to the JVM.
Logan Shaw - 02 Apr 2008 03:22 GMT
>>> I am receiving the following error message when I shutdown Tomcat:
>>> "Error occurred during initialization of VM
>>> Could not reserve enough space for object heap"
>>> The server has 4GB of RAM and the Tomcat has been set to claim upto
>>> 2GB of memory.

> The JVM is on a Sun V240 server with Solaris 9.0.

32-bit or 64-bit JVM?  Both seem to be available for SPARC/Solaris
systems.

Also, it has been a while since I have used Solaris regularly, but I
suppose it may still be possible to boot into a 32-bit kernel on that
OS and hardware.  If so, that would be worth checking.

  - Logan
Roedy Green - 01 Apr 2008 19:27 GMT
>The server has 4GB of RAM and the Tomcat has been set to claim upto
>2GB of memory.

Try cutting that back.  Unless you have a 64-bit Java, is not your
entire address space only 2GB?  Your heap could be nowhere near that
big since so much other junk including DLLs must fit in that same
address space.

Signature

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.