0

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 ?

Thanks.

Felipe Rojas
  • 649
  • 5
  • 7

1 Answers1

1

Connect to the application using Java Mission Control and either do a manual recording or set up a memory trigger. The user guide for mission control is at http://docs.oracle.com/javacomponents/jmc-5-5/jmc-user-guide/index.html and http://docs.oracle.com/javacomponents/jmc-5-5/jfr-runtime-guide/index.html

You can also use the template manager to record all garbage collection activity. That way you can see allocation data in terms of where the code is making objects.

Costlow
  • 113
  • 3