I was looking for a way to dynamically prevent OOME.
I wanted to implement an 'OutofMemoryERROR Warning System' as described in OOME Warning System,
but in stead of reacting to a pending OOME by increasing the PercentageUsageThreshold (at runtime), I wanted this system to find the culprit thread (which was allocating all these objects) and 'kill it'.
Is this feasible ?
I am not very +ive about developing such a thing. I would rather focus on writing code that avoids out of memory issues. I have seen cases where the issue was in the underlying JRE instead of the application code. Based on app server you can work with the app server vendor or JRE vendor. Monitor GC logs and nail down the issue.
But do post a solution in case you develop something innovative.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop