Operating System - HP-UX
1843976 Members
1727 Online
110226 Solutions
New Discussion

java.lang.OutOfMemoryError

 
SOLVED
Go to solution
ambika_1
Frequent Advisor

java.lang.OutOfMemoryError

Hi,
I am trying to run some tests in HPUX 11.23 IPF. I am testing jobss server. When i run testsuite i am getting following error.
The following error occurred while executing this line:
java.lang.OutOfMemoryError

I ma using following option to run testsuite.
export JAVA_HOME=/opt/java1.4
export PATH=/opt/java1.4/bin:$PATH
export HOSTNAME=martin.india.hp.com
export ANT_OPTS="-Xmx512m -Xms512m"
ant tests 2<&1 | tee ant.log

When i searched in google, i got a info that we need to increse the heap through the ANT options, which i am alreay using.

Can any one help me regarding the same.

Thanks and Regards,
ambika
13 REPLIES 13
Steven E. Protter
Exalted Contributor

Re: java.lang.OutOfMemoryError

Shalom,

swapinfo -tam

Lets see if we are really out of memory. The memory error could be bad code or an unstable java release.

You might wish to look at your version of JAVA. Having the latest from http://www.hp.com/go/java is always a good idea.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi,
Here is the output swapinfo -tam.
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 8192 0 8192 0% 0 - 1 /dev/vg00/lvol2
reserve - 888 -888
memory 4085 1434 2651 35%
total 12277 2322 9955 19% - 0 -

Still i am running the ant tests once again.
Here is the version of java which i am using,

/opt/java1.4/bin/java -version
java version "1.4.2.11"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2.11-060824-11:11)
Java HotSpot(TM) Server VM (build 1.4.2 1.4.2.11-060824-16:35-IA64N IA64, mixed mode)


Thanks and Regards,
Ambika
Dennis Handly
Acclaimed Contributor

Re: java.lang.OutOfMemoryError

What is your maxdsiz and maxdsiz_64bit? And the same with maxssiz and maxssiz_64bit
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi,

Here are the values.
maxdsiz 1073741824 Default Immed
maxdsiz_64bit 294967296 Default Immed
maxssiz 8388608 Default Immed
maxssiz_64bit 268435456 Default Immed

Thanks and Regards,
ambika

ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi,
I saw one more thing, the command in which its getting stucked most of the time, uses a file which contains 1227915 lines. Its trying to parse this file, file size is 95831297. Is this is causing problem?

Thanks and Regards,
Ambika
Dennis Handly
Acclaimed Contributor

Re: java.lang.OutOfMemoryError

>maxdsiz 1073741824 Default Immed
>maxdsiz_64bit 294967296 Default Immed

Is this a typo? Your 64 bit value is smaller than the 32 bit one. This overrides, so you have a data area 1/4 the size.
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi,
Sorry its a typing mistake.
Actaul values are,
maxdsiz 1073741824 Default Immed
maxdsiz_64bit 4294967296 Default Immed
maxssiz 8388608 Default Immed
maxssiz_64bit 268435456 Default Immed

Thanks and Regards,
Ambika

Dennis Handly
Acclaimed Contributor

Re: java.lang.OutOfMemoryError

>the command in which its getting stucked most of the time, uses a file which contains 1227915 lines.

You seem to have 9.9 Gb swap, your config values look large enough to have 1 Gb. You could try doubling maxdsiz.

That file may need more than 1 GB in the java heap?
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi,
File size itself is 9.5 Gb, we need to increase only Data secgment( maxdsiz) ? maxdsiz value should be increased to what value? Already its 1073741824 which is more enough to handle a 9Gb file. Please can you clarify on this?

Thanks and Regards,
ambika
Tim Medford
Valued Contributor
Solution

Re: java.lang.OutOfMemoryError

I don't think it's a HPUX kernel problem, it's java. We run a rather large RMI server process and need to bump the java heap size to 1024. Try adjusting that in the ANT_OPTS.

-Xmx1024m -Xms1024m

Here is what out process looks like from a ps command:

/opt/java1.4/jre/bin/PA_RISC2.0/java -DAGENT=WCISQA -Xmx1024m -

Tim
Dennis Handly
Acclaimed Contributor

Re: java.lang.OutOfMemoryError

>File size itself is 9.5 Gb

Before you said: file size is 95831297
That's 95 Mb.
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Hi All,
Thanks alot, it solved my problem by increasing the value which we send through ANT_OPTIONS.

Thanks and Regards,
Ambika
ambika_1
Frequent Advisor

Re: java.lang.OutOfMemoryError

Thanks.