I have been trying to diagnose a memory issue we are having on our
production servers for the past couple of days. One of the current
suspects is an elastic related issue and I need a little help to
confirm or reject this hypothesis.
The symptoms are as follows(version details at bottom of post). The
memory usage on our Tomcat server machine grows steadily without limit
until all memory, both physical and swap, is exhausted, and the OS
dies. The memory usage growth is all from the single tomcat server
process. The fact that memory consumption grows beyond the max heap
size points to non-heap memory growth.
The only seemingly relevant logs(currently on INFO level) are
repeated blocks of the following:
2011-06-20 12:30:18,712 [New I/O server worker #1-6] WARN -
[Destiny] received ping response with no matching id [84020]
2011-06-20 12:30:18,715 [New I/O server worker #1-5] WARN -
[Destiny] received ping response with no matching id [84020]
2011-06-20 12:30:18,717 [New I/O server worker #1-8] WARN -
[Destiny] received ping response with no matching id [84020]
2011-06-20 12:30:18,727 [New I/O server worker #1-5] WARN -
[Kala] received ping response with no matching id [84009]
2011-06-20 12:30:18,764 [New I/O server worker #1-4] WARN -
[Kala] received ping response with no matching id [84009]
2011-06-20 12:30:18,770 [New I/O server worker #1-3] WARN -
[Kala] received ping response with no matching id [84009]
2011-06-20 12:30:18,780 [New I/O server worker #1-1] WARN -
[Stacy, George] received ping response with no matching id [84043]
2011-06-20 12:30:18,784 [New I/O server worker #1-2] WARN -
[Stacy, George] received ping response with no matching id [84043]
2011-06-20 12:30:18,793 [New I/O server worker #1-5] WARN -
[Stacy, George] received ping response with no matching id [84043]
This happens periodically and seems to match the growth of memory
usage(this statement needs to be verified but seems to be correct).
It seems to happen more often initially just after the server has
started and then at longer intervals.
Since Java NIO could allocate non-heap memory (e.g. direct ByteBuffer)
I am wondering if anyone could confirm that this could actually be the
cause of our leak.
PLEASE NOTE: This is on our Tomcat server machine not on our Elastic
server machine.
The Tomcat startup command is:
/usr/lib/jvm/java-6-sun/bin/java -Djava.util.logging.config.file=/var/
lib/tomcat6/conf/logging.properties -Djava.awt.headless=true -server -
Xss1M -Xms2G -Xmx3G -XX:NewSize=1G -XX:MaxPermSize=768M -XX:
+UseConcMarkSweepGC -XX:+CMSIncrementalMode -
XX:CMSInitiatingOccupancyFraction=80 -XX:+UseConcMarkSweepGC -
Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager -
Djava.endorsed.dirs=/usr/share/tomcat6/endorsed -classpath /usr/share/
tomcat6/bin/bootstrap.jar -Dcatalina.base=/var/lib/tomcat6 -
Dcatalina.home=/usr/share/tomcat6 -Djava.io.tmpdir=/tmp/tomcat6-tmp
org.apache.catalina.startup.Bootstrap start
The machine has 6Gb physical memory and a 700Mb swap partition. As
you can see the -Xmx is 3G.
We are using:
Ubuntu 2.6.32-30-server 64-bit
Java(TM) SE Runtime Environment (build 1.6.0_24-b07) Java HotSpot(TM)
64-Bit Server VM (build 19.1-b02, mixed mode)
Elastic Search 0.16.2
Tomcat 6.0.24
Thanks a bunch.