Quantcast
Channel: Active questions tagged redis+ruby-on-rails - Stack Overflow
Viewing all articles
Browse latest Browse all 873

Rails + Redis + Sidekiq error: IO::EAGAINWaitReadable

$
0
0

I'm getting random IO::EAGAINWaitReadable sometimes when executing a job from Sidekiq with redis as caching service.

redis and sidekiq are running on the same server. I'm also getting this issue sometimes when I try to get a value from Rails.cache.

Any idea ?

PS: No need to provide code here as it makes no sense.

EDIT

Answer found

After some research and reading more about redis, here's what I found: https://redis.io/topics/lru-cache

Using allkeys-lru really did the Job here, and we're no longer receiving timeouts due to the keys being deleted when they're not used.

How to fix

open the redis-cli:

redis-cli

Now, in the cli

CONFIG SET maxmemory 8GCONFIG SET maxmemory-policy allkeys-lru

You can change the 8G memory to whatever you want.


Viewing all articles
Browse latest Browse all 873

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>