-
Check the biggest key in redis. Helpful if there are memory issues.
-
redis-cli --bigkeys
-
-
Check if the API key exist:
-
keys apikey-{key ID}
-
-
Maxmemory
-
Check the maxmemory current valueconfig
-
get maxmemory
-
-
Check the maxmemory policy set (this will show the policy that sets the behavior for keys removal)config
-
get maxmemory-policy
-
-
-
Get the key using a string in the value. This command should be run in the terminal
-
for k in $(redis-cli KEYS '*'); do echo $k \"$(redis-cli GET $k)\"; done | grep "{search string like alias or API ID in access_rights of the key}"
-
-
Change key expiration(useful when debugging expired keys)
-
GET apikey-{key ID}
-
(copy the value of above command, change the values of \"expires\":1674030418, to a previous epoch timestamp
-
SET apikey-{key ID} {insert the modified value above)
-
-
Delete all apikey-*
-
for k in $(redis-cli KEYS 'apikey-*'); do echo $k \"$(redis-cli DEL key $k)\"; done
-
-
Info
-
To check the memory details like used_memory, maxmemory-policy. Helpful if to check which eviction policy are set
-
info memory
-
-
To check the stats especially helpful if there are evicted keys and number of expired keys
-
info stats
-
-
To check the details about the server, it will show the uptime in seconds and days
-
info server
-
-
Comments
0 comments
Please sign in to leave a comment.