1. Problems and phenomena
There is a dump file with a size of 14G, which is analyzed by the jhat tool
error out of memory
Reading from gl.hprof... Dump file created Wed Jun 08 17:56:28 CST 2022 Exception in thread "main" java.lang.OutOfMemoryError: Java heap space at java.util.Hashtable.addEntry(Hashtable.java:436) at java.util.Hashtable.put(Hashtable.java:477) at com.sun.tools.hat.internal.model.Snapshot.addHeapObject(Snapshot.java:166) at com.sun.tools.hat.internal.parser.HprofReader.readInstance(HprofReader.java:744) at com.sun.tools.hat.internal.parser.HprofReader.readHeapDump(HprofReader.java:491) at com.sun.tools.hat.internal.parser.HprofReader.read(HprofReader.java:275) at com.sun.tools.hat.internal.parser.Reader.readFile(Reader.java:92) at com.sun.tools.hat.Main.main(Main.java:159) [root@nccztsjb-node-27 data]# netstat -ntlp
I changed a host with 32G memory, and the execution still reported an error of memory overflow. I was thinking about whether the jhat tool itself has a memory limit…
2. Solution
Increase the memory used by jhat
jhat -J-mx20g gl.hprof
Use -J to specify the size of the memory. [-J-mx20g]
Read More:
- Idea Error: java: java.lang.OutOfMemoryError: GC overhead limit exceeded
- [Solved] Response Export error on submit request on future invoke, java.lang.OutOfMemoryError: Java heap space
- [HBase Error]“java.lang.OutOfMemoryError: Requested array size exceeds VM limit”
- flutter | W/zipro(12512): Error opening archive D:\…Invalid file ERROR: dump failed because…
- Java.lang.AbstractMethodError: org.mybatis.spring.transaction.SpringManagedTransaction.getTimeout()Ljava/lang/Integer; error resolution
- [Solved] IDEA JSP File out.println Error: Cannot resolve method ‘println(java.lang.String)’
- Hive ERROR Failed with exception java.io.IOException:java.lang.IllegalArgumentException
- [Solved] java.lang.reflect.InaccessibleObjectException: Unable to make protected java.net.http.HttpRequest()…
- Spark Error: java.lang.StackOverflowError [How to Solve]
- Tomcat startup error: java.lang.NoClassDefFoundError
- [Solved] Hadoop error java.lang.nosuchmethoderror
- [Solved] Error: exception: java.lang.reflect.InvocationTargetException: null
- [How to Solve] java.lang.IllegalArgumentException: Request header is too large
- [Solved] Weblogic startup error: java.lang.NoClassDefFoundError
- How to Solve Error: Android java.lang.IllegalStateException: Could not execute method of the activity
- [Solved] java.lang.IllegalStateException: Cannot get a STRING value from a NUMERIC cell
- [Android Error] java.lang.RuntimeException: An error occurred while executing doInBackground()
- [Solved] Android DataBinding Error: java.lang.ArrayIndexOutOfBoundsException: length=2; index=2 fragment Changes to Fragm
- Project startup error: outofmemoryerror [How to Solve]