An article helped investigate a memory issue recently: https://ma.ttias.be/redis-oom-command-not-allowed-used-memory-maxmemory/
Some commands I’ve found useful are:
redis-cli -h my.host.com -p port_id -a my-plaintext-password
within redis-cli
:
[info](https://redis.io/commands/info) memory
[MONITOR](https://redis.io/commands/monitor)
: “a debugging command that streams back every command processed by the Redis server.”[FLUSHALL](https://redis.io/commands/flushall)
: “Delete all the keys of all the existing databases, not just the currently selected one. This command never fails.”also:
redis-cli --stat
redis-cli --bigkeys
redis-cli
> info memory
# Memory
used_memory_human:49.96M
…
redis-cli --stat
------- data ------ --------------------- load -------------------- - child -
keys mem clients blocked requests connections
4 49.89M 15 5 91088 (+0) 4217
4 49.89M 15 6 91106 (+18) 4217
4 49.97M 15 6 91124 (+18) 4218
4 49.93M 15 6 91141 (+17) 4218
redis-cli --bigkeys
# Scanning the entire keyspace to find biggest keys as well as
# average sizes per key type. You can use -i 0.1 to sleep 0.1 sec
# per 100 SCAN commands (not usually needed).
[00.00%] Biggest hash found so far 'xxxxx.' with 8 fields
-------- summary -------
Sampled 1 keys in the keyspace!
Total key length in bytes is 13 (avg len 13.00)
Biggest hash found 'xxxxx.' has 8 fields
0 strings with 0 bytes (00.00% of keys, avg size 0.00)
0 lists with 0 items (00.00% of keys, avg size 0.00)
1 hashs with 8 fields (100.00% of keys, avg size 8.00)
0 streams with 0 entries (00.00% of keys, avg size 0.00)
0 sets with 0 members (00.00% of keys, avg size 0.00)
0 zsets with 0 members (00.00% of keys, avg size 0.00)