This content has been marked as final. Show 4 replies
Few things you could do here is,
1. Check GC logs to check if Garbage collector selected is able to release un-referenced objects. Logs will give you hint about possible memory leak.
If you have not set debug GC logs then set it using -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+PrintGCApplicationStoppedTime -XX:+PrintGC -Xloggc:/logs/server1_gclogs.txt
2. Would prefer to take heap dump on OOM and use any tool like jhat or MAT to analyse. It will help in deciding if you require any performance tuning at JVM level. sometime it happens that heap space allocated is tool low causing OOM.
For taking heap dump either set it as JAVA option - "*-XX:+HeapDumpOnOutOfMemoryError*"
using Sun tool "jmap"
$ jmap –heap:format=b <pid>