Reputation: 244
I have already added JVM args : -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath=C:\Temp Sometimes after I saw JVM created heapdump file but there is no OutOfMemoryError reported in the application error.log file. My question how is it possible that JVM creates heap dump file without throwing any error. It could be a problem with Application (AEM) or JVM?
Upvotes: 1
Views: 1390
Reputation: 2288
If your application runs out of memory it is hard to tell exactly what will happen.
If my understanding is correct then the following might have happened: While your Java application was running at some point one of the Threads might have triggered an OutOfMemoryError.
If this application has no catch statement (for either OutOfMemoryError, Error, Throwable) or some other mechanism like: https://docs.oracle.com/javase/7/docs/api/java/lang/Thread.html#setDefaultUncaughtExceptionHandler(java.lang.Thread.UncaughtExceptionHandler) that logs to your application logfile you might not see it.
It can however be that some information was printed to either stdout / stderr which may (or may not) have been redirected to some other file.
To increase the chance of that happening you might want to use something like: -XX:+CrashOnOutOfMemoryError
that will print the cause even if the application does not log it. See for more info or other options: https://dzone.com/articles/outofmemoryerror-related-jvm-arguments
Even more useful might be to log the activity and statistics of the Garbage Collector and analyze it. See: How to enable Java GC Logging? on https://gceasy.io/
Upvotes: 1
Reputation: 300
Those options are only relevant to the JVM and are not application-specific. It's unlikely to be anything related to AEM.
Upvotes: 0