Redis key expiry not working?

52 views
Skip to first unread message

Owais Ahmad

unread,
Aug 2, 2016, 2:59:09 AM8/2/16
to Redis DB
Hi all,

My application sets expiry for all keys but here is that I observed:

redis-cli MONITOR
> SET abcd "123"
> EXPIRE abcd 300
> GET abcd "123"

^C

redis
-cli
> TTL abcd -1
> TTL abcd -1
> TTL abcd 284
> TTL abcd 193
.
.
.

The keys do not show an expiry until I get its TTL multiple times.
This is the reason that keys are not being expired, and memory is not being freed up.

I am using the latest stable version of redis-server: 3.2.2

Please let me know what could be wrong, and how I can fix this so that volatile keys surely expire.

Regards,
Owais
Reply all
Reply to author
Forward
0 new messages