LEAK: You are creating too many HashedWheelTimer instances

2,023 views
Skip to first unread message

Yan Pei

unread,
Jul 1, 2016, 1:05:05 PM7/1/16
to Akka User List
Hello All,

  I am using AKKA 2.4.4 and Cassandra 2.x.
  Today I found there is an error from the thread of 'actor-system-cassndra-plugin-default-dispatcher-380': 

LEAK: You are creating too many HashedWheelTimer instances.  HashedWheelTimer is a shared resource that must be reused across the JVM,so that only a few instances are created.

Could anybody give me an hint which part cause the error? AKKA or Canssandra? How to fix it?

Thanks,
Yan





Viktor Klang

unread,
Jul 1, 2016, 1:47:45 PM7/1/16
to Akka User List

I would suspect that you may be creating new ActorSystem instances instead of reusing a single one.

--
Cheers,

--
>>>>>>>>>> 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+...@googlegroups.com.
To post to this group, send email to akka...@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Yan Pei

unread,
Jul 1, 2016, 1:59:55 PM7/1/16
to Akka User List
We run this application via a scheduler, every three hours. We did shutdown ActorSystem at the end of each run and restart ActorSystem at the beginning of each run. Will it cause problem?

Thanks,
Yan

Patrik Nordwall

unread,
Jul 5, 2016, 6:11:19 AM7/5/16
to akka...@googlegroups.com
Could it be that these are created by Netty via Cassandra client driver via akka-persistence-cassandra? You can try to add "ch.qos.logback" % "logback-classic" % "1.1.3" dependency and enable logging in logback.xml for 
<logger name="com.datastax.driver" level="DEBUG" />

That might show you what the Cassandra driver is doing, e.g. scheduling reconnects or something.

/Patrik
--

Patrik Nordwall
Akka Tech Lead
Lightbend -  Reactive apps on the JVM
Twitter: @patriknw

Yan Pei

unread,
Jul 5, 2016, 2:37:01 PM7/5/16
to Akka User List
Patrik,
  I suspected it might be from Cassandra client driver too. I haven't seen those errors for two days. Will add the "ch.qos.logback' like you suggested below. Thank you very much!

Yan
Reply all
Reply to author
Forward
0 new messages