Operating System - HP-UX
1820475 Members
2939 Online
109624 Solutions
New Discussion юеВ

Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

 
SOLVED
Go to solution
Jerry_109
Super Advisor

Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

Hello All,

I was working with some DBA's who were supporting the installation of PeopleSoft application which has a DB configuration, and they received the following error. Do you konw what needs to be increased to prevent this error ?
#######################################

Installing Peoplesoft Database Configuration. Please wait...
The ORACLE_SID Environment Variable has been updated to 'pststdmo'


Executing createdb10.sql for Oracle


Executing utlspace.sql for Oracle
Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

#######################################
HP-UX hohp226 B.11.11 U 9000/800/rp7410
#######################################


Physical: 8380416 Kbytes, lockable: 6464320 Kbytes, available: 7425500 Kbytes

root@hohp226[/root]
# swapinfo -tam
Mb Mb Mb PCT START/ Mb
TYPE AVAIL USED FREE USED LIMIT RESERVE PRI NAME
dev 4096 624 3472 15% 0 - 1 /dev/vg00/swap
dev 4096 629 3467 15% 0 - 1 /dev/vg00/swap2
reserve - 6737 -6737
memory 6325 1174 5151 19%
total 14517 9164 5353 63% - 0 -
##################################

root@hohp226[/root]
# kmtune | egrep -i "swap|mem|shmmax"
aio_physmem_pct 10 - 10
allocate_fs_swapmap 0 - 0
core_addshmem_read 0 Y 0
core_addshmem_write 0 Y 0
eqmemsize 15 - 15
iomemsize - - 40000
max_mem_window 0 - 0
maxswapchunks 16384 - 16384
netmemmax - - 0
nswapdev 10 - 10
nswapfs 10 - 10
remote_nfs_swap 0 - 0
shmem 1 - 1
shmmax 0x40000000 Y 0X40000000
swapmem_on 1 - 1
unlockable_mem 0 - 0


# kmtune | grep -i shmmax
shmmax 0x40000000 Y 0X40000000
calculated value : 1073741824


root@hohp226[/root]
# getconf KERNEL_BITS
64

# kmtune | grep maxd
maxdsiz_64bit 2147483648 - 2147483648

######################################





9 REPLIES 9
Dennis Handly
Acclaimed Contributor
Solution

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

># kmtune | grep maxd
maxdsiz_64bit 2147483648 - 2147483648

Is this a 32 or 64 bit process?
Where is maxdsiz?
If 64 bit, 2 Gb may be too small.

Jerry_109
Super Advisor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

64 bit

root@hohp226[/root]
# getconf KERNEL_BITS
64
TTr
Honored Contributor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

> shmmax 0x40000000 Y 0X40000000
> calculated value : 1073741824

The shmmax seems to be too small. I have a peoplesoft server where it is 8.5GB.

Your server has swapped out to disk too. This will affect your performance.

8GB of physical RAM should be more than enough for a peoplesoft DEMO environment. Since you used it all up and swapped to disk, you must be running many other things in this server. This may have fragmented the memory so much that you cannot get a contiguous shared memory segment of the required size.

Try running the dbcreate script with a clean system.
Dennis Handly
Acclaimed Contributor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

Here is a copy of your duplicate threadId=1236597 before it was deleted:
root@hohp226[/root]
# ipcs -bom
IPC status from /dev/kmem as of Fri May 30 16:55:15 2008
T ID KEY MODE OWNER GROUP NATTCH SEGSZ
Shared Memory:
m 0 0x412407a8 --rw-rw-rw- root root 0 348
m 1 0x4e0c0002 --rw-rw-rw- root root 1 61760
m 2 0x41280509 --rw-rw-rw- root root 1 8192
m 3 0x30243ebc --rw-rw-rw- root root 4 1048576
m 7684 0x06347849 --rw-rw-rw- root root 1 77384
m 5 0x0c6629c9 --rw-r----- root root 2 34963456
m 1030 0xffffffff --rw-r--rw- root root 0 22908
m 25095 0x5e2e45dc --rw-r----- oracle dba 10 337088512
m 520 0x1586ec40 --rw-r----- oracle dba 10 337088512
m 9 0x27ceefac --rw-r----- oracle dba 12 337088512
m 10 0x675cf940 --rw-r----- oracle dba 15 538415104
m 523 0x41281568 --rw-rw-rw- root root 1 8785
m 524 0x412819e5 --rw-rw-rw- root root 1 8785
m 525 0x412813fd --rw-rw-rw- root root 1 8785
m 526 0x4128151b --rw-rw-rw- root root 1 8785
m 527 0x41281562 --rw-rw-rw- root root 1 8785
m 528 0x412819a6 --rw-rw-rw- root root 1 8785
m 529 0x412819e4 --rw-rw-rw- root root 1 8785
m 530 0x41281bc5 --rw-rw-rw- root root 1 8785
m 531 0x41283859 --rw-rw-rw- root root 1 8785
m 532 0x412838a8 --rw-rw-rw- root root 1 8785
m 533 0xe7ea55dc --rw-r----- oracle dba 18 419438592
m 22 0xfb823f58 --rw-r----- oracle dba 9 286752768
m 24087 0xee2724c0 --rw-r----- oracle dba 9 269975552
m 536 0x3236f1a4 --rw-r----- oracle dba 9 219643904
m 1049 0xb8178114 --rw-r----- oracle dba 18 650125312
m 1643546 0xc2072b6c --rw-r----- oracle dba 18 650125312
m 27 0x309a3dd4 --rw-r----- oracle dba 18 377495552
m 6172 0x829746d8 --rw-r----- oracle dba 17 482353152
m 4637 0x9f598c04 --rw-r----- oracle dba 22 432021504
m 3614 0xf0eb9394 --rw-r----- oracle dba 14 461381632
TTr
Honored Contributor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

> ipcs -bom

There are 14 segments in use by oracle in this listing. Based on their sizes I am guessing most of them are SGAs. So your memory space is quite busy and fragmented. This may be an issue as well.
Jerry_109
Super Advisor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

Another question :

I will be changing the following kernel parms as follows.

shmmax : from=1073741824 to=5905580032
maxdsiz : from=1073741824 to=2147483648
maxdsiz_64bit : from=2147483648 to=4294967296


I was told I need to change maxtsiz parms also? What are your thoughts? :

maxtsiz 0x4000000 Y 0X4000000

maxtsiz_64bit 0x40000000 Y 0X40000000


I have not forgotten about everyones points, just waiting for closure.
Dennis Handly
Acclaimed Contributor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

>I was told I need to change maxtsiz parms also?

Don't bother. You don't typically have huge programs, just huge data.
And since you are using java, you don't have ANY program, just the jvm and any native methods.
Jerry_109
Super Advisor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

Hello All,

It's me again. After the kernel changes, the appl/dba still gets the same error. I research the web and located the following info. Let me know your thoughts before I forward to users. Thanks .

###########################
java.lang.OutOfMemoryError: Java heap space .: CIS Knowledge Base

java.lang.OutOfMemoryError: Java heap space
Problem:

The error 'java.lang.OutOfMemoryError: Java heap space' is caused when the JVM (Java Virtual Machine) runs out of available memory during processing. This can be caused by:

a large number of files on your system
an extremely large benchmark document
an OVAL test that returns a large number of results
a system that doesn't meet the minimum memory requirement of the NG Scoring tool (256MB)
The NG tool by default sets a maximum heap size of 256MB. The directions below describe how to increase this value on UNIX and Windows systems.

Solution:

For UNIX systems:

When running the tool include the heap space argument '-Xmx'. For example:

./ng.sh -Xmx512m

Where '-Xmx512m' sets the maximum heap size to 512MB of memory. Higher values may be used where additional memory is available.



###########################
Dennis Handly
Acclaimed Contributor

Re: Exception in thread "Thread-20" java.lang.OutOfMemoryError: Java heap space

>the appl/dba still gets the same error. I research the web and located the following info. Let me know your thoughts before I forward to users.
>When running the tool include the heap space argument '-Xmx'.

Yes it seems you need this option to make it bigger.