Memor Leak in akka.dispatch.forkjoin.ForkJoinTask?

Hey,

I have a simple HTTP Application with a small in memory cache that fetches values from Redis. The amount of data promoted seems to slowly increase, where the survivor space becomes always full - the Yonge GC durations increases proportionally to a point where it is 100ms +. This happens with both CMS and G1.

At the same time, follow a heap dump, most of the memory (70%, 200mb) is consumed by akka.dispatch.forkjoin.ForkJoinTask, and I see the following large objects: (a) java.lang.ApplicationShutdownHooks.hooks, (b) java.lang.SecurityManager.rootGroup. Screenshots of object tree are attached

Granted, my Redis driver is somehow using 2000 threads, which is not how scala is intended to be used. https://github.com/scredis/scredis/issues/81




Do you start (and stop) many ActorSystem instances?

The Redis driver we were using was creating an ActorSystem per Redis node. We has a 30 node Redis cluster…
Fixing it to use one ActorSystem fixed it

Thanks!