I am using Couchbase Scala SDK with akka. Every time I run my application, I get the following error in my logs after some time. Has anyone encountered the issue? Is there a way to resolve it?
[ERROR] [<timestamp>] [AkkaIq-akka.actor.default-dispatcher-<n>] [com.couchbase.client.core.deps.io.netty.util.HashedWheelTimer] 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.
First, congratulations on asking what I believe is the first forum question on the new alpha Scala client
The HashedWheelTimer is only created in a couple of places in the code - when you create a Cluster and when you create an Environment. Both of those should only be happening once per application, and my guess is that the application is creating multiple ones accidentally.
Thanks for your help. I checked my code and noticed that I was calling cluster connection multiple times. I modified my code to lazily instantiate the connection instance only once which led to error message disappearing.
Glad to hear you got to the bottom of it @ali.parsaei