We are using Akka(using JAVA) framework to shoot messages to back end servers .Our application works fine for a duration of 5-6 hours shooting around 1.6 million messages.Then it becomes unresponsive.After analyzing GC logs ,we found JVM was not able to clean up heap memory .We took a heap dump and analyzed it using Eclipse memory analyzer tool .It showed us two possible causes of memory leak as mentioned below ,both are related to AKKA.
One instance of "akka.actor.LocalActorRef" occupies 393,842,136 (42.88%) bytes. The memory is accumulated in one instance of "scala.collection.immutable.RedBlackTree$BlackTree" loaded by "sun.misc.Launcher$AppClassLoader
8,774 instances of "akka.actor.RepointableActorRef", occupy 419,071,456 (45.62%) bytes. These instances are referenced from one instance of "java.util.HashMap$Node
We are killing all actors and their corresponding children once it finishes the work.Also we are overriding the supervise Strategy and making sure it kills actor when there is any exception.
All of it not helping to pile up objects in heap.Is there any specific way to make sure akka system does not leak with actor We are killing all actors and their corresponding children once it finishes the work.Also we are overriding the supervise Strategy and making sure it kills actor when there is any exception.
All of it not helping to pile up objects in heap.Is there any specific way to make sure akka system does not leak with actor