Operating System - HP-UX
1830354 Members
2324 Online
110001 Solutions
New Discussion

Re: Exception: java.lang.OutOfMemoryError

 
J.S. HARIHARA KUMAR
New Member

Exception: java.lang.OutOfMemoryError

Hi,

I have an web application deployed on Tomcat in HP-UX 11.11. When i execute an java class called AuthenticationManager.java through an command line, i get the following error.

Exception java.lang.OutOfMemoryError: requested 5386240 bytes for OneContigSpaceCardGeneration::grow_to_reserved. Out of swap space?
Possible causes:
- not enough swap space left, or
- kernel parameter MAXDSIZ is very small.
=> low system memory? commit_memory fails: 2
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
Stack_Trace: error while unwinding stack
( 0) 0xc0000000015ee81c
( 1) 0xc000000001576f9c
( 2) 0xc000000001576ba4
( 3) 0xc0000000015769b8
( 4) 0xc0000000014de214
( 5) 0xc0000000014de654
( 6) 0xc000000001561f38
( 7) 0xc0000000019bf8ac
( 8) 0xc0000000019bf504
( 9) 0xc0000000019be3f0
(10) 0xc0000000019beb04
(11) 0xc0000000019be0c8
(12) 0xc000000001877670
(13) 0xc00000000005bfc0 __pthread_body + 0x50 [/usr/lib/pa20_64/libpthread.1]
(14) 0xc00000000006687c __pthread_start + 0x14 [/usr/lib/pa20_64/libpthread.1]

I believe it is something to do with the java heap size settings. I am new to HP-UX and have not worked much on the same.

Any inputs or comments to resolve this issue would be of great help.

Thanks in Advance.

Harihara Kumar. J.S
3 REPLIES 3
RAC_1
Honored Contributor

Re: Exception: java.lang.OutOfMemoryError

check maxdsiz, maxdsiz_64bit, maxssiz, maxssiz_64bit and maxtsiz, maxtsiz_64bit.

Try incresasing values of maxssiz and maxssiz_64 bit and check.
There is no substitute to HARDWORK
J.S. HARIHARA KUMAR
New Member

Re: Exception: java.lang.OutOfMemoryError

Hi RAC,

Thanks for you suggestion.

Can you pls. tell me what is the max size i can set or i should set for maxssiz and maxssiz_64bit.

What is the maximum limit for the other variable maxdsiz, maxdsiz_64bit, maxtsiz, maxtsiz_64bit.

Also, can you pls. let me know if i do require to increase the values of other parameters like max_thread_proc and nkthread.

Thanks and Regards,
Harihara Kumar. J.S

Bill Hassell
Honored Contributor

Re: Exception: java.lang.OutOfMemoryError

This error is very common for 32bit applications. ASSUMING that you have lots of RAM and swap space, the heap (or local data) is requesting 5 megs and can't get it. Check your current setting for maxdsiz (the 32bit fence). It may be only 64megs. Use kmtune -q maxdsiz, or just use kmtune to see all the kernel parameters. NOTE: maxtsiz is the limit for the instruction quadrant, so unless your program is several MILLION lines of code, there is no need to change it. Same with maxssiz (the program stack area). A really bad program might dump hundreds of megs of data on a stack, but that is a very unportable and novice technique. You can leave maxssiz and maxtsiz alone.

The limit for maxdsiz can be set to 1700 megs if you want -- it is just a fence for runaway programs. BUT maxdsiz_64 must be larger than maxdsiz, maxdsiz_64 can be terabytes in size.

Use kmtune to see the other parameters. There is no way to guess at the thread parameters -- you must know your application code requirements. You can always bump them up by a factor of 3x to 5x.

For all of this, just run the program sam and select the kernel configuration section. Note specifically the HELP ON CONTEXT to read about the specific highlighted parameter.


Bill Hassell, sysadmin