Take a look at the following documentation:
In first place, you must understand the issue. So try reading this article: https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/memleaks002.html
Next, may be after reading you must be able to understand:
- Out of memory exception can happen due to many factors: prolonged retaining of objects in memory, causing no space to create new objects. Or programming error, causing lot of objects created in memory with in a fraction, leading to no memory to create new objects.
- In both cases: you must look in to your log, metrics etc to see, which case is affecting: prolonged or sudden rise in memory
- You can also write java actions, which can provide memory usage at the current moment of the application. Based on that, you can probably find the root cause of which functionality is causing this issue and work on that.
- Accordingly you can take actions.
@Nirmalkumar/Shreyash, thanks for your replies!
I did go through the logs actually (please see above). To repeat the specific question I'm trying to ask here -
“The errors logged here don’t seem to match up with the OutOfMemory errors reported by the m2ee’s “show_critical_log_messages” command.
Also I wanted to trace the root cause for these errors, but I can’t find any stacktrace & I’m not sure what to do with “execution id: 1643613366487-38”.
Typically, in my limited experience with Java-based apps, whenever the max heap size threshold is reached, I have a complete stacktrace to see the sequence of methods called allowing me trace it back to the source of the problem. But here, in this case, all I see being logged is the “execution-id” & no stacktrace, or other information to work with. I’m looking for a way to figure out what microflow was executing? Or what Scheduled Event was running? Or what custom Java action was running? – that may have caused this error.
Where can I find that stacktrace? (Or is there some logging-level that I need to reconfigure in order to see this stacktrace)
(Note - Btw, this is an on-premise app & there is no monitoring/metrics-gathering in place yet.)