views:

580

answers:

3

Hello,

After upgrading to JBoss AS 5.1, running JRE 1.6_17, CentOS 5 Linux, the JRE process runs out of memory after about 8 hours (hits 3G max on a 32-bit system). This happens on both servers in the cluster under moderate load. Java heap usage settles down, but the overall JVM footprint just continues to grow. Thread count is very stable and maxes out at 370 threads with a thread stack size set at 128K.

The footprint of the JVM reaches 3G, then it dies with:

java.lang.OutOfMemoryError: requested 32756 bytes for ChunkPool::allocate. Out of swap space?

  Internal Error (allocation.cpp:117), pid=8443, tid=1667668880
  Error: ChunkPool::allocate

Current JVM memory args are:

-Xms1024m -Xmx1024m -XX:MaxPermSize=256m -XX:ThreadStackSize=128

Given these settings, I would expect the process footprint to settle in around 1.5G. Instead, it just keeps growing until it hits 3G.

It seems none of the standard Java memory tools can tell me what in the native side of the JVM is eating all this memory. (Eclipse MAT, jmap, etc). Pmap on the PID just gives me a bunch of [ anon ] allocations which don't really help much. This memory problem occurs when I have no JNI nor java.nio classes loaded, as far as I can tell.

How can I troubleshoot the native/internal side of the JVM to find out where all the non-heap memory is going?

Thank you! I am rapidly running out of ideas and restarting the app servers every 8 hours is not going to be a very good solution.

A: 

Attach with Jvisualvm in the JDK to get an idea on what goes on. jvisualvm can attach to a running process.

Thorbjørn Ravn Andersen
A: 

As @Thorbjørn suggested, profile your application.

If you need more memory, you could go for a 64bit kernel and JVM.

John Doe
A: 

Walton: I had similar issue, posted my question/finding in https://community.jboss.org/thread/152698 . Please try adding -Djboss.vfs.forceCopy=false to java start up parameter to see if it helps. WARN: even if it cut down process size, you need to test more to make sure everything all right.

Samuel Cai