Mapviewer service cannot start

 Applies To 
 Product(s):Exor Map Server MSV
 Environment: N/A
 Area: MapViewer Service
 Subarea: N/A
 Original Author:Bentley Technical Support Group




The Mapviewer service cannot be started.  The error that we are receiving in the error logs is:

Error occurred during initialization of VMCould not reserve enough space for object heap


The error you are getting indicates that there is not enough memory available to Mapviewer on the application server. You have three options available:

  1. Allocate more memory to Mapviewer by changing the start up parameters
  2. Increase the memory available on the app server
  3. Try and reduce the load (map layers) that Mapviewer has to deal with.

Whenever JVM starts for any program it normally allocates a specific amount of memory in the heap. This is normally specified by the -Xms runtime parameter. If by any chance JVM is not able to allocate that amount of memory then it will stop loading the classes and throw an exception. Similarly there is another parameter Xmx that specifies the maximum amount of memory that can be allocated to JVM during execution. By specifying -J-Xms256m -J-Xmx256m, you are telling the JVM to start with 256m of memory and keep to that limit during runtime as well.

To increase the amount of memory available to Mapviewer please read the information below:

Setting the memory for MapViewer

Make sure you backup the OPMN.XML file first. The procedure below will make changes to that file.  The best way to do this is through the Enterprise Manager console on the application server. To do this, use a URL like this:

  1. Login as ias_admin - with whatever password you have set. Once in the console, click on the link that points at the Middle Tier.
  2. You should see a list of middle tier OC4J components. Click on the Mapviewer component.
  3. Click on the Administration option / tab
  4. Click on Server Properties
  5. On the Server Options page, look down for Command Line options. Then for the entry for Java Options. You need to add this to the options line before the ones that exist already: -Xmx256M -Xms128M In general each mapviewer instance requires atleast 512MB of memory and preferably more (1GB).  Therefore consider setting this to -Xmx1512MB -Xms1024MB.
  6. You should also add the -server command i.e. –server  -Xmx1480m -Xm1024m

If you now apply the changes and restart the component, it should have the correct amount of memory reserved.

See Also

Product TechNotes and FAQs

External Links

Bentley Technical Support KnowledgeBase

Bentley LEARN Server