Home  >  Q&A  >  body text

How to get heap dump in case of outofmemory

tomcat is outofmemory and unresponsive on the server. Is there any way to know what is occupying memory? Please recommend tools and methods.

大家讲道理大家讲道理2702 days ago631

reply all(1)I'll reply

  • 大家讲道理

    大家讲道理2017-05-27 17:43:34

    JDK_HOME/bin/
    Execute jmap -dump:format=b,file=/home/longhao/heamdump.out <pid>
    You can also pass -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=${DOMAIN_HOME}/logs/ mps"
    dump and download it to the local system
    Use Memory Analyzer to analyze

    reply
    0
  • Cancelreply