In my redis database I have a key:
127.0.0.1:6379[5]> get "263384DB-61DD561800016316-240C0700"
"{"json":{"created":"1641895448090335","last_signal":"1641895448","tos":"184","deleted":"0","num_sfds":"4","num_streams":"4","num_medias":"2","num_tags":"2","num_maps":"2","ml_deleted":"0","created_from":
... about 6300 chars
I try
127.0.0.1:6379[5]> del "263384DB-61DD561800016316-240C0700"
(integer) 1
I also tried:
127.0.0.1:6379[5]> DEL `"263384DB-61DD561800016316-240C0700"`
Invalid argument(s)
127.0.0.1:6379[5]> DEL '"263384DB-61DD561800016316-240C0700"'
(integer) 0
but value is still there:
127.0.0.1:6379[5]> get "263384DB-61DD561800016316-240C0700"
"{"json":{"created":"1641895448090335","last_signal":"1641895448","tos":"184","deleted":"0","num_sfds":"4","num_streams":"4","num_medias":"2","num_tags":"2","num_maps":"2","ml_deleted":"0","created_from"
... about 6300 chars
TTL is 24 hours, but key is 20 or more days old. What could be the reason?
Now I also tried
UNLINK "263384DB-61DD561800016316-240C0700"
(integer) 1
key still exists.
2
Answers
Comment from Mark was helpful. It seams the key is written again every 5 seconds: (Query every few seconds)
127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86395 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86399 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86398 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86398 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86398 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86395 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86397 127.0.0.1:6379[5]> ttl "263384DB-61DD561800016316-240C0700" (integer) 86400
from redis-cli MONITOR:
1651147523.327082 [5 127.0.0.1:53408] "EXPIRE" "263384DB-61DD561800016316-240C0700" "86400" 1651147528.326984 [5 127.0.0.1:53408] "SET" "263384DB-61DD561800016316-240C0700" "{"json":{"created":"1641895448090335...
so this is not a REDIS issue, it is the software writing the keys (rtp engine)
I am not sure why you continue trying to delete your key after you run:
and get a successful result of:
In order to debug it, start another Terminal session and run Redis’s
MONITOR
command:then you can see all the commands coming into Redis.
Also, try running this in your original session, to see the key’s "Time-to-Live", both before and after attempting to delete the key: