Advertisement

check tomcat version

/opt/tomcat/bin/version.sh

tomcat6 cluster

tomcat 7 outofmemeory heap dump

  • in catalina.sh
JAVA_OPTS='-XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=/path/to/dir'
  • one line java code cause out of memory
long[] l = new long[Integer.MAX_VALUE];
Community content is available under CC-BY-SA unless otherwise noted.