scredis / scredis

Non-blocking, ultra-fast Scala Redis client built on top of Akka IO.

Home Page:https://scredis.github.io/scredis/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Receive timeout while using redis as cache in play framework

ChaitanyaAnpat opened this issue · comments

am using redis as cache to store data in Play framework application. Redis module is enabled using following config in application.conf

play.modules.disabled += "play.api.cache.EhCacheModule"

Also library used while for redis integration is in build.sbt:-

libraryDependencies += "com.github.karelcemus" %% "play-redis" % "1.4.0"

In .classpath I have

I got error on set and get data in redis cache.

The exact error I am getting in application.log is:-

[error] s.i.ListenerActor - Receive timeout [error] p.a.cache.redis - Command GET classTag::_cursor_UPDATE_VAL for key 'GET' failed. scredis.exceptions.RedisIOException: Receive timeout to localhost/127.0.0.1:6379 at scredis.io.ListenerActor$$anonfun$reconnecting$1.applyOrElse(ListenerActor.scala:414) at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:170) at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:171) at akka.actor.Actor$class.aroundReceive(Actor.scala:497) at scredis.io.ListenerActor.aroundReceive(ListenerActor.scala:27) at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526) at akka.actor.dungeon.DeathWatch$class.receivedTerminated(DeathWatch.scala:46) at akka.actor.ActorCell.receivedTerminated(ActorCell.scala:374) at akka.actor.ActorCell.autoReceiveMessage(ActorCell.scala:511) at akka.actor.ActorCell.invoke(ActorCell.scala:494)

I checked /var/log/redis/redis-server.log but file is empty.

After getting this error frequently, I restarted the server and was able set/get data in redis cache. redis runs fine for 7-8 days, I am able to set/get data in cache but after 7-8 days will get same error again and I have to restart redis.

Is this due to redis is not accepting for new request? Which configurations should I change?

I can't offer specific advice for this problem, but I can point out that the version of play-redis you're using is almost 2 years out of date. The plugin now no longer uses scredis.

It also depends on a version of scredis that is similarly old, and missing some known bug fixes that may be related.

I will update the plugin and check logs.

Closing because there is no response from requestor.

In case of other problems please create new github issue.

I am getting the same error.
scredis.exceptions.RedisIOException: Receive timeout
at scredis.io.ListenerActor$$anonfun$reconnecting$1.applyOrElse(ListenerActor.scala:403)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:175)
at scala.PartialFunction$OrElse.applyOrElse(PartialFunction.scala:176)
at akka.actor.Actor.aroundReceive(Actor.scala:537)
at akka.actor.Actor.aroundReceive$(Actor.scala:535)
at scredis.io.ListenerActor.aroundReceive(ListenerActor.scala:22)
at akka.actor.ActorCell.receiveMessage(ActorCell.scala:579)
at akka.actor.dungeon.DeathWatch.$anonfun$receivedTerminated$1(DeathWatch.scala:79)
at akka.actor.dungeon.DeathWatch.$anonfun$receivedTerminated$1$adapted(DeathWatch.scala:70)
at scala.Option.foreach(Option.scala:407)
at akka.actor.dungeon.DeathWatch.receivedTerminated(DeathWatch.scala:70)
at akka.actor.dungeon.DeathWatch.receivedTerminated$(DeathWatch.scala:69)
at akka.actor.ActorCell.receivedTerminated(ActorCell.scala:410)
at akka.actor.ActorCell.autoReceiveMessage(ActorCell.scala:562)
at akka.actor.ActorCell.invoke(ActorCell.scala:545)
at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:270)
at akka.dispatch.Mailbox.run(Mailbox.scala:231)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)

version :-
"com.github.scredis" %% "scredis" % "2.2.6"

Could you plz help in this.

Hi, thanks for reporting, try update to latest scredis version as there could be some fixes along the way and let me know if it still timeouts.