I'm running some Rails applications on Jboss with JRuby.
Sometimes the Java garbage collector can't free memory and the jvm consume all the available memory.
I'm trying to create a custom metric with jstat, but can't figure out some valuable stats that allows me to detect some risky condition and take some action on the server before Java crash.
When all the memory on the jvm is used, one core of the server stay at full capacity trying to collect and free some memory.
Do you have an idea of how can I detect when the GC is about to fail ?