Operating System - HP-UX
1824189 Members
5173 Online
109669 Solutions
New Discussion юеВ

Re: java.lang.OutOfMemoryError

 
Amoli
Occasional Advisor

java.lang.OutOfMemoryError

I am using Websphere 5.0.2.4 on HP-UX 11.11. I see java.lang.OutOfMemoryError in our logs quite often.

This is what I found in the pdf(UXPerfCookBook.pdf), which I downloaded from HP site regarding performance tuning:

"Be careful about programs getting "out of memory" errors, though, because those are usually related to not having
enough swap space reservable or hitting a configuration limit. Relevant kernel parameters are dbc_min_pct, dbc_max_pct, bufpages, nbuf, maxswapchunks,swapmem_on, maxtsiz, maxssiz, and especially maxdsiz."

Also, on the forums on HP site, someone has posted regarding a similar error:
http://forums1.itrc.hp.com/service/forums/questionanswer.do?admit=716493758+1116864734702+28353475&threadId=211942
Again here, they have recommended tuning of kernel parameters, if required, and updating with latest HP-UX patches and HP-UX for Java patches.

The attached file shows the current values the kernel parameters are set to.

Wondering if my current values for the above mentioned parameters are okay or if bumping up the value of any of the above mentioned parameters would help me?
If I need to increase any of the parameters, to what value should they be set?

Someone please advise.
14 REPLIES 14
Deoncia Grayson_1
Honored Contributor

Re: java.lang.OutOfMemoryError

How much physical memory do you have installed on your server and how much space do you allocated to swap?
If no one ever took risks, Michelangelo would have painted the Sistine floor. -Neil Simon
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

Please find attached the glance o/p showing the swap details.
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

Also attching the glance o/p showing memory details
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

Someone please help me.
Amit Dixit_2
Regular Advisor

Re: java.lang.OutOfMemoryError

Hi Anmoli,
I recently did a lot of Research and FineTuning JVm based application I will be glad if I can be of any help to you.

Can you send me following details

JVM Version.
$uname -a
And Patches installed on the server.

Thanks,
Amit.
Amit Dixit_2
Regular Advisor

Re: java.lang.OutOfMemoryError

Hi Anmoli,
Also Can you send me the details of websphere config.

How much you have allocated to the webSphere
what are the values you have specified in
Xmn and Xmx parameter.

Thanks,
Amit.
Ganesha Sridhara
Honored Contributor

Re: java.lang.OutOfMemoryError

The following tool may be helpful:
http://www.hp.com/products1/unix/java/java2/hpjconfig/


Also you can increase the Minimum and Maximum memory of the JVM/Java process by using following option with java-JVM:

-ms256m -mx512m

Regards,
Ganesha Sridhara
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

uname -a:
HP-UX thprod22 B.11.11 U 9000/800 1602309313 unlimited-user license

java version "1.3.1.13"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1.13-040210-15:41)
Java HotSpot(TM) Server VM (build 1.3.1 1.3.1.13-_10_feb_2004_17_15 PA2.0, mixed
mode)

Also, find the values of Xms and Xmx in the attached gif.

Note: We have a vertical websphere cluster of 3 clones.

Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

I guess we already have set the values as:
-Xms256m and -Xmx512m

I do not know, how I can find the patches installed on HP-UX? I tried to use check_patches utility but it requires root access, which I do not have. Please let me know....
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

Please find in the attachment the information I got regarding the patches on running HPjconfig.
Amoli
Occasional Advisor

Re: java.lang.OutOfMemoryError

Would just like to add that the Exception is:

java.lang.OutOfMemoryError: unable to create native thread

Thanks,
Amoli
Amit Dixit_2
Regular Advisor

Re: java.lang.OutOfMemoryError

Hi Anmoli,
First I would like to ask few question

1. Is there any specific requirement you are still running JVM 1.3.X why dont you upgrade to 1.4.x it will most of your problems.

2. Why you have only allocated 512M to websphere, I think you have enoguh memory installed on the server why dont you change it to Xms=512M and Xmx=1024M

But before you do that it's better you upgrade JVM version.

Please let me know if you can opt to upgrade JVM version.
Amit Dixit_2
Regular Advisor

Re: java.lang.OutOfMemoryError

Hi Anmoli,
The error
java.lang.OutOfMemoryError: unable to create native thread

Represents that the O.S. is not allowing your JVM to create more threads and it basically give wrong error message which is
java.lang.OutOfMemoryError

You can change the parameter to 4096 and see but dont make such changes to production test it on you DEV or QA box and see.

Also, be careful with kernel parameter's as they overall affect how kernel behaves with other application.

You will also need to tune related kernel parameters.
Amit Dixit_2
Regular Advisor

Re: java.lang.OutOfMemoryError

Hi Anmoli,
The error
java.lang.OutOfMemoryError: unable to create native thread

Represents that the O.S. is not allowing your JVM to create more threads and it basically give wrong error message which is
java.lang.OutOfMemoryError

You can change the parameter max_thread_proc to 4096 and see but dont make such changes to production test it on you DEV or QA box and see.

Also, be careful with kernel parameter's as they overall affect how kernel behaves with other application.

You will also need to tune related kernel parameters.