1845411 Members
2620 Online
110244 Solutions
New Discussion

Java outofmemory error

 
Chetan_5
Frequent Advisor

Java outofmemory error

Hi all,

We added more CPU and memory to an existing partition which is running a java application. After this the application comes to a halt with the error
java.lang.OutOfMemoryError: unable to create new native thread

We are using Java 1.4 and is a 32 bit app. I changed max_thread_proc to a higher number, increased heap sizes based on vendor recommendation but no improvement .. Has anyone seen this?

Here are the kernel parameters :
maxdsiz 79532032 / 2147483648
maxdsiz_64bit 52555776 / 4294967296
maxfiles_lim 55 / 8192
maxssiz 1310720 / 250000000
maxssiz_64bit 524288 / 1073741824
maxtsiz 2125824 / 250000000
maxtsiz_64bit 117440512 / 1073741824
maxuprc 127 / 9216
max_thread_proc 58 / 32768
maxvgs 1 / 20
msgmni 0 / 10240
msgseg 0 / 32767
msgtql 0 / 10240
nfile 2397 / 155648
nflocks 90 / 4096
ninode 1609 / 83968
nkthread 843 / 32768
nproc 335 / 10240
npty 0 / 256
nstrpty 5 / 256
nstrtel 0 / 256
nswapdev 1 / 10
nswapfs 0 / 10
semmni 33 / 8192
semmns 1303 / 16384
shmmax 4294967296 / 4294967296
shmmni 16 / 1024
shmseg 5 / 300
5 REPLIES 5
Steven E. Protter
Exalted Contributor

Re: Java outofmemory error

Shalom,

I've seen this from time to time. Fixed it by going to the latest java release from http://www.hp.com/go/java

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
Tim Nelson
Honored Contributor

Re: Java outofmemory error

Here is a question.

You claim 32bit Java
You set maxdsiz to over 2GB

32bit apps with possible > 2GB ram allocation ?

what is your heap size set to ?




James R. Ferguson
Acclaimed Contributor

Re: Java outofmemory error

Hi :

Out-of-Memory errors can be caused by insufficient swap space for process reservation, too. Verify your swap utilization (when attempting to run!) with 'swapinfo -tam'.

Regards!

...JRF...
Chetan_5
Frequent Advisor

Re: Java outofmemory error

Here are the startup options

-Xms1600m -Xmx1600m -Xmn600m \
-XX:MaxPermSize=32m -XX:PermSize=32m \

I am a little new to this app/java so pls bear with me.

I say its a 32bit apps because kcusage reports utilization for maxsiz and maxdsiz for the app but not for the corresponding 64bit parameters.

Also I see that the java is invoked as java_q4p in kcusage which means it is accessing the higher memory regions?
IT Response
Esteemed Contributor

Re: Java outofmemory error

Hi Chetan,
Unfortunately these type of messages cannot be solved on the fly, at least most of the time. Java out of memory can be, swap, can be new generation, old generation, permanent generation could be c-heap, I have seen it also when you run out of user thteads max_thread proc.
I suggest you open a call with your local HP response center and take it from there. You will need to submit at least a print of memory regions of the process from glance and -Xverbosegc output to start.
cheers,
Nick