Reputation: 449
We have 3 apps on our server. They talk to each other via Redis. Redis is the bus for all communication.
Something on our server is incorrectly deleting keys from Redis. I am trying to track down the problem. For each app, I downloaded the code to my machine, and then tried:
grep -iR "flush" *
grep -iR "del" *
Two of the apps are free of "flush" and "del". Only one app has "del". So I found its PID and:
kill -9 2312
I also did "ps aux" to make sure that app was off.
The other 2 apps only have:
hset
hget
hmgetall
The disappearance of the keys in Redis is erratic. Some keys last several minutes, or even hours. Others disappear quickly.
As near as I can see, none of the developers have set timeouts on the keys in Redis. But maybe something sets a default timeout?
How do I debug this? Where do I look?
Upvotes: 1
Views: 1803
Reputation: 7229
Do take a look at Redis configuration:
config get maxmemory*
Be sure that maxmemory is large enough for your dataset otherwise keys will be automatically dropped with the specified maxmemory-policy.
Upvotes: 2