Hi everyone, We have a pretty weird memory leak - akka.dispatch.Envelope instances are not garbage collected.
Here is the code: List<ActorRef> actors = new ArrayList<>(); for (int i = 0; i < ACTOR_COUNT; i++) { actors.add(system.actorOf(...)); } for (ActorRef actor : actors) { system.scheduler().schedule(FiniteDuration.create(0, TimeUnit.MILLISECONDS), FiniteDuration.create(1000, TimeUnit.MILLISECONDS), actor, "Run", system. dispatcher(), null); } It creates a number of actors and then creates a scheduler for each of them. Actors itself are responsible for querying MQ and then process a message. When ACTOR_COUNT > 30, everything is good. But otherwise, we have a memory leak (instances of akka.dispatch.Envelopes with message "Run" are filling up and can't be garbage collected) It's pretty weird, because when we have more actors, then we have more messages (1 per second for each of them) - but unexpectedly it STOPS filling up when there are more actors/messages. Time interval (1000 ms) doesn't really affect the situation, it just make it slower or faster. Could you please explain this behavior for me? Thank you. -- >>>>>>>>>> Read the docs: http://akka.io/docs/ >>>>>>>>>> Check the FAQ: >>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html >>>>>>>>>> Search the archives: https://groups.google.com/group/akka-user --- You received this message because you are subscribed to the Google Groups "Akka User List" group. To unsubscribe from this group and stop receiving emails from it, send an email to akka-user+unsubscr...@googlegroups.com. To post to this group, send email to akka-user@googlegroups.com. Visit this group at https://groups.google.com/group/akka-user. For more options, visit https://groups.google.com/d/optout.