The ListenThread because of an error: java.lang.OutOfMemoryError: Java heap space
This means lot of objects being created and not all are being marked for GC. These unnecessary objects are cluttering the heap space and resulting in this error.
Possible cause of issue -
1. Undersized java heap
In such case we need to tune the following JVM arguments -XmsXXXm -XmxXXXm -XX:MaxPermSizeXXXm
2. Possibly a Application memory leak.
Hence to move forward with the issue we need to
1. Collect Heap dumps.
In case the issue is reproducible then we can see this option below to generate heap dump when encounter OOM
-XX:+HeapDumpOnOutOfMemoryError
or else we can use theis option to generate heap dump in Unix
jmap -heap:format=b <PID>
2. Enable GC as below -
-verbosegc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:"/<path_to_file>/gc_date +%d%m%Y.$$.log" [SUN JDK]
This means lot of objects being created and not all are being marked for GC. These unnecessary objects are cluttering the heap space and resulting in this error.
Possible cause of issue -
1. Undersized java heap
In such case we need to tune the following JVM arguments -XmsXXXm -XmxXXXm -XX:MaxPermSizeXXXm
2. Possibly a Application memory leak.
Hence to move forward with the issue we need to
1. Collect Heap dumps.
In case the issue is reproducible then we can see this option below to generate heap dump when encounter OOM
-XX:+HeapDumpOnOutOfMemoryError
or else we can use theis option to generate heap dump in Unix
jmap -heap:format=b <PID>
2. Enable GC as below -
-verbosegc -XX:+PrintGCTimeStamps -XX:+PrintGCDetails -Xloggc:"/<path_to_file>/gc_date +%d%m%Y.$$.log" [SUN JDK]
No comments:
Post a Comment