Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

High Java memory consumption.

900093Nov 14 2011 — edited Nov 25 2011
Hello,

We are developing a solution using Servoy, which is a database server framework built in java. We have now 2 Servoy instances running on Debian linux servers, one with 64bit, both of them running java 1.6 update 26. We are having lot of crashes of the server with this error log:

-------
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 32776 bytes for Chunk::new
# Possible reasons:
# The system is out of physical RAM or swap space
# In 32 bit mode, the process size limit was hit
# Possible solutions:
# Reduce memory load on the system
# Increase physical memory or swap space
# Check if swap backing store is full
# Use 64 bit Java on a 64 bit OS
# Decrease Java heap size (-Xmx/-Xms)
# Decrease number of Java threads
# Decrease Java thread stack sizes (-Xss)
# Set larger code cache with -XX:ReservedCodeCacheSize=
# This output file may be truncated or incomplete.
#
# Out of Memory Error (allocation.cpp:317), pid=12359, tid=1777961872
#
# JRE version: 6.0_26-b03
# Java VM: Java HotSpot(TM) Server VM (20.1-b02 mixed mode linux-x86 )

--------------- T H R E A D ---------------

Current thread (0x092c8400): JavaThread "C2 CompilerThread1" daemon [_thread_in_native, id=12368, stack(0x69f18000,0x69f99000)]

Stack: [0x69f18000,0x69f99000], sp=0x69f95fe0, free space=503k
Native frames: (J=compiled Java code, j=interpreted, Vv=VM code, C=native code)
V [libjvm.so+0x7248b0]
-------

We checked both the heap memory and the memory used by java in this case and we notice a highly increase of the total java memory, while the heap memory is resonable:

------
JVM Information
java.vm.name=Java HotSpot(TM) Server VM
java.version=1.6.0_26
java.vm.info=mixed mode
java.vm.vendor=Sun Microsystems Inc.

Operating System Information
os.name=Linux
os.version=2.6.29-xs5.5.0.17
os.arch=i386

System Information
Heap memory: allocated=141440K, used=105555K, max=699072K
None Heap memory: allocated=49312K, used=49018K, max=180224K
------
root 16388 2.5 43.0 2829220 1811772 ? Sl 20:11 3:43 java -Djava.awt.headless=true -Xmx768m -Xms128m -XX:MaxPermSize=128m -classpath .:lib/ohj-jewt.jar:lib/MRJAdapter.jar:lib/compat141.ja
------

Right now we are running it on the 64bit machine with -Xmx256m -Xms64m, and the memory is the same as on the 32bit one.

We also tried different memory configurations, but the result is the same. Java goes up to more the 2GB of memory used, while the heap is about 100MB - 400MB. In the output above you can see 1.8GB used, but this is at startup, after few hours it goes to more then 2GB - 2.5GB, then it crashes in at most few days, sometimes in few hours or even less.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 23 2011
Added on Nov 14 2011
10 comments
4,688 views