amazon web services - How to determine that a jvm app does more GC than normal work? -
we had problem our ec2 instances had 90-100 percent cpu load cause of bug in library include created many objects instead of reusing them (which easy solvable), spent time in gc.
unfortunately aws health checks , instance status metrics didn't cause overloaded instances stopped , new ones restarted, after time hit max autoscaling number and....died. our own health checks inside app used elb simple answered enough not cause instances terminated...and restarted, mitigate problem quite time.
my idea use our custom health check included in elb health checks report failure if spent time in gc.
how such thing inside app?
there number of jvm parameters allow gc monitoring
-xloggc:<file> // logs gc activity file -xx:+printgcdetails // tells how different generations impacted
you can either parse these logs or use specific tool such gcviewer analyse gc activity.
Comments
Post a Comment