Operations Dashboard 2.X getting "java.lang.OutOfMemoryError: Java heap space" errors

  • KM506162
  • 25-Oct-2008
  • 25-Oct-2008


Operations Dashboard's JVM maximum heap size -Xmx value is set to a 256 MB by default. This value may be too low if you are running a large deployment or dealing with large amounts of data.


Following error is observed in jetspeed.log:
[http-18080-Processor25] ERROR
[jetspeed] - Servlet.service() for servlet jetspeed threw exception
java.lang.OutOfMemoryError: Java heap space


This error can occur when the Java Virtual Machine (JVM) runs out of space in the heap utilization as set by the -Xmx parameter. Since the value for the JVM heap are quite low (256MB by default), this can occur whenever dealing with large deployments or large amounts of data. The result is the Operations Dashboard portal may fail to load.


Adjusting the Jetspeed Portal Server Process Memory
To adjust the amount of memory available to the Jetspeed portal server, follow these steps:
1     Stop the portal server processes, if they are running.
       •     Windows: Stop the HP Operations Dashboard
                           PortalServer service.
       •     HP-UX: /sbin/init.d/ovdshbdjetspeed stop
       •     Solaris: /etc/init.d/ovdshbdjetspeed stop
2     In any text editor, open the process script. To edit this script you must
       have Administrator privileges on Windows and root access on UNIX:
       •    Windows:
              Modify the -Xms and -Xmx settings for the Jetspeed service. The
              following example sets the initial and maximum heap sizes to
              128M and 512M, respectively:
              set JAVA_OPTS=%JAVA_OPTS% -Xms128m -Xmx256m
              rem Guess CATALINA_HOME if not defined
              set CURRENT_DIR=%cd%
              if not "%CATALINA_HOME%" == "" goto gotHome
              set CATALINA_HOME=%CURRENT_DIR%
              if exist "%CATALINA_HOME%\bin\catalina.bat" goto okHome
              cd ..
              set CATALINA_HOME=%cd%
              cd %CURRENT_DIR%
       •     UNIX:
              Modify the JAVA_OPTS environment variable to add the new
              memory settings. The following example sets the JAVA_OPTS
              variable to include setting the initial and maximum heap sizes
              to 128M and 512M, respectively.
              set JAVA_OPTS=%JAVA_OPTS% -ms128m -mx256m
3     Restart the Jetspeed processes:
       •     Windows:
              — Uninstall the Jetspeed service:
                      j2.bat uninstall
                   Uninstalling the service is necessary to reset registry entries
                   that store the startup arguments.
              — Install the Jetspeed service:
                      j2.bat install
              — Installing the service does not start the services.
       • HP-UX: /sbin/init.d/ovdshbdjetspeed start
       • Solaris: /etc/init.d/ovdshbdjetspeed start