JVM has provided helpful arguments to deal with OutOfMemoryError. Those
JVM arguments are:-XX:+HeapDumpOnOutOfMemoryError
-XX:HeapDumpPath-XX:OnOutOfMemoryError-XX:+ExitOnOutOfMemoryError-XX:+CrashOnOutOfMemoryErrorIn
order to diagnose OutOfMemoryError or any memory related problem, one
would have to capture heap dump right at the moment or few moments
before the application starts to experience OutOfMemoryError. It’s hard
to do capture heap dump at the right moment manually because we will not
...