Java. lang. OutOfMemoryError: PermGenspace Solution
Online java applications report permanent (PermGen) OOM. In case of permanent OOM, there is no way to do it. It can only be expanded permanently.
All you need to do is to change the large PermSize parameter. You need to know the capacity of the permanent generation. However, the startup parameters of this java instance do not have the PermSize definition. The default size of this instance must be used permanently. What is the default size of permanent generation? The default size of JDK1.6 is 82 MB. Is that true? Execute stat-gccapacity pid on this instance. The command result is as follows:
Execute command:/export/servers/jdk1.6.0 _ 25/bin/jstat-gccapacity 27478 500 1
Ngcncmx NGC S0C S1C EC ogcen ogcmx ogc oc pgcpgcmx PGC PC YGC FGC
174720.0 699008.0 174720.0 1792.0 1792.0 171136.0 349568.0 1398144.0 349568.0 349568.0 21248.0 83968.0 80384.0 80384.0 73933 159
PGCMX corresponds to the maximum value of permanent generation, and 8 KB is converted to MB, which is exactly 82 M. This is too small to add a parameter to the startup parameter:
-XX: MaxPermSize = 256 m
To facilitate future heap memory OOM Analysis on memory, add two parameters:
-XX: + HeapDumpOnOutOfMemoryError
-XX: HeapDumpPath =/export/Logs/im. **. com/