Service Desk Practitioners Forum
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting a Java.lang.OutOfMemory error.

Highlighted
GishBandara
Regular Collector

Getting a Java.lang.OutOfMemory error.

Hi All,
I am using service desk 4.5 service pak 20. I have received the Java.lang.OutOfMemory error and the service desk service got crashed and i had to restart the services.Forum says that i need to increase the java heap size. But i need to find out the current specified limits for the java heap size. Could someone please tell me hot to find these values.
5 REPLIES
Vasily Kamenev
Honored Contributor

Re: Getting a Java.lang.OutOfMemory error.

hi
you need optimize the memory settings.
remove the existing hp service from register or demon. Add to installservice.bat/.sh memory parameters -XX:MaxNewSize=64M -XX:NewSize=64M -Xms768M -Xmx1000M, the values of parameters depends from your server's memory, change the values and run installservice again. read documentation about, sd45_Installation_guide.pdf p.69.


Vasily
Jonathon Druce
Honored Contributor

Re: Getting a Java.lang.OutOfMemory error.

I assume that you used the default install path. Have a look at C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\server\bin\installservice.bat. The one supplied uses the default amount of java memory but there is instructions in there to increase it. You will need to uninstall the service, edit the batch file and then re-install. You can also start the console in such a way that you can see amount of memory used. I also think it is in the log file on startup.

Re: Getting a Java.lang.OutOfMemory error.

From the guide:
*************
The above error message is an indication that the JVM ran out of memory. This a situation where the SD application performs actions too fast for the virtual machine to handle in a default setting. In Chapter 3 of the "Installation_guide.pdf", the section "Optimizing the Memory Settings" addresses these JVM memory related issues. The section states that some adjustments are needed when running more than approximately 50 users on a single SD application Server. Factors affecting memory usage include the frequency of calls created/modified and the number of DB rules that will trigger when a record is created/modified.
To alleviate the occurrences of running out of JVM memory:
1. Review the section "Optimizing the Memory Settings" to learn more about the memory reserved for use by JVM .
2. Re-configure the SD Application servers so that SD server/servers are dedicated for Client connections only, other SD servers for Integration, email and Service pages.
*************

In the servicedesk 4.5 installation manual you can find how to adjust these setting to solve this problem. (from page 69)

I have tried to before to solve this problem.
The workaround is to restart the servicedesk services evertime this problem happens, but the solution are these steps.

If these steps also don't work try to look which Java version you are running and try to install the latest supported version!

(I was not able to attach the manual to this post because of it's size (5mb))
GishBandara
Regular Collector

Re: Getting a Java.lang.OutOfMemory error.

Hi All,
Thanks for all the replies. I have been told that in the past they have increased the Java Heap size of the application. But the person who did this has left the company. I can see the current settings in sd_server.bat file. see below.

But need to know if this can be increaed in command line, typing that command under C:\Program Files\Hewlett-Packard\OpenView\service desk 4.5\server\bin.

Coz it is important to know the current allocated size before set the values for that command.
Can someone please confirm that we can increase the heap size for that application through only the sd_server.bat file.

The current RAM in the Box is 4GB.
And the sd_server.bat file setting as follows.

@ECHO OFF
if "%1"=="START" goto start
if "%1"=="start" goto start
if "%1"=="STOP" goto stop
if "%1"=="stop" goto stop
echo Syntax: sd_server [START/STOP]
pause
goto end
:start
cd ..
shift
rem use this options when you have memory problems
rem java -XX:MaxNewSize=64M -XX:NewSize=64M -Xms200M -Xmx1000M -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.bus.AppServer -showconsoleoutput %1 %2 %3 %4 %5 %6 %7 %8 %9
java -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.bus.AppServer -showconsoleoutput %1 %2 %3 %4 %5 %6 %7 %8 %9
cd bin
goto end
:stop
cd ..
echo trying to stop local server
java -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.ui.AppServerManager localhost 30999
cd bin
goto end
:end
Jonathon Druce
Honored Contributor

Re: Getting a Java.lang.OutOfMemory error.

It is using the default memory settings. There is a rem infront of the line that increases the memory. If you rem out the line that starts java -cp and remove the rem from the line above you will find when the service is uninstalled and reinstalled it will use upto 1Gb of Java memory.

ie

java -XX:MaxNewSize=64M -XX:NewSize=64M -Xms200M -Xmx1000M -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.bus.AppServer -showconsoleoutput %1 %2 %3 %4 %5 %6 %7 %8 %9
rem java -cp lib\classloader.jar com.hp.startup.Bootstrap com.hp.ifc.bus.AppServer -showconsoleoutput %1 %2 %3 %4 %5 %6 %7 %8 %9
//Add this to "OnDomLoad" event