question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle 'Redis is loading the dataset in memory' inside the driver

See original GitHub issue

Hello Mark,

Should not Lettuce driver handle this exception and retry when Redis server becomes available? Not propagating this exception to a client.

java.util.concurrent.CompletionException: com.lambdaworks.redis.RedisCommandExecutionException: LOADING Redis is loading the dataset in memory
	at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
	at java.util.concurrent.CompletableFuture.completeRelay(CompletableFuture.java:338)
	at java.util.concurrent.CompletableFuture.uniRelay(CompletableFuture.java:911)
	at java.util.concurrent.CompletableFuture.uniCompose(CompletableFuture.java:953)
	at java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:926)
	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:474)
	at java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:561)
	at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:800)
	at java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:442)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
	at java.lang.Thread.run(Thread.java:748)
Caused by: com.lambdaworks.redis.RedisCommandExecutionException: LOADING Redis is loading the dataset in memory
	at com.lambdaworks.redis.protocol.AsyncCommand.completeResult(AsyncCommand.java:119)
	at com.lambdaworks.redis.protocol.AsyncCommand.complete(AsyncCommand.java:110)
	at com.lambdaworks.redis.protocol.CommandHandler.decode(CommandHandler.java:287)
	at com.lambdaworks.redis.protocol.CommandHandler.channelRead(CommandHandler.java:259)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
	at io.netty.channel.ChannelInboundHandlerAdapter.channelRead(ChannelInboundHandlerAdapter.java:86)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:335)
	at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1294)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:356)
	at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:342)
	at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:911)
	at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:934)
	at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:397)
	at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:302)
	at io.netty.util.concurrent.SingleThreadEventExecutor$2.run(SingleThreadEventExecutor.java:131)
	at io.netty.util.concurrent.DefaultThreadFactory$DefaultRunnableDecorator.run(DefaultThreadFactory.java:138)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
Hronomcommented, Jan 22, 2018

Have created issue on Redis tracker, please support it https://github.com/antirez/redis/issues/4624 To make Redis open TCP port only when it’s ready.

0reactions
perluncommented, May 18, 2020

For the record, io.lettuce.core.RedisLoadingException is being thrown if this happens with the current version of Lettuce (4.5.0 or greater).

The issue that was tracking the implementation is https://github.com/lettuce-io/lettuce-core/issues/682.

Read more comments on GitHub >

github_iconTop Results From Across the Web

ERROR: LOADING Redis is loading the dataset in memory
In short, the error “LOADING Redis is loading the dataset in memory” occurs at Redis master startup or when the slave reconnects and...
Read more >
LOADING Redis is loading the dataset in memory - Skynats
The error message is triggered when these connection requests arrive before the dataset has fully loaded into memory.
Read more >
Redis - Loading Dataset is Memory Sport: - Stack Overflow
Loading dataset error message happens in two cases: At master startup. When a slave reconnects and performs a full resynchronization with a ...
Read more >
Redis: in-memory data store. How it works and why you ...
Redis is an open source, in-memory data store that delivers sub-millisecond response times. Top use cases include: caching, session store, leaderboard, ...
Read more >
Bulk loading - Redis
For all of these reasons the preferred way to mass import data into Redis is to generate a text file containing the Redis...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found