intermediateTop 30 Scenario-Based Questions
Your Redis is running out of memory. How do you handle this without data loss?
Investigation: 1) INFO memory: check used_memory, peak_memory, mem_fragmentation_ratio. 2) redis-cli --bigkeys: find largest keys consuming most memory. 3) MEMORY USAGE key: check specific key sizes. 4) Immediate actions: 5) Set maxmemory if not set: CONFIG SET maxmemory 4gb. 6) Set eviction policy: CONFIG SET maxmemory-policy allkeys-lru (for cache). 7) OBJECT ENCODING key: check if using memory-
This is a Pro chapter
Sign in, then upgrade to Pro or Power to unlock this and the full Databases Mastery library.
Your Redis is running out of memory. How do you handle this without data loss?