TraceResolveSRE Platform
MCP ServerAdmin

[ioredis] Unhandled error event: ReplyError: OOM command not allowed when used memory > 'maxmemory'.

[ioredis] Unhandled error event: ReplyError: OOM command not allowed when used memory > 'maxmemory'.
Immediate Remediation
bash
# Check current memory and policy
redis-cli INFO memory | grep -E "used_memory|maxmemory"
redis-cli CONFIG GET maxmemory-policy

# Allow Redis to evict keys instead of rejecting writes
redis-cli CONFIG SET maxmemory-policy allkeys-lru

# Or raise the limit if you have spare RAM
redis-cli CONFIG SET maxmemory 512mb
Root Cause Analysis

Redis hit its configured `maxmemory` limit and its eviction policy is set to `noeviction`, so every write command (including `SET` from `CacheService.setSession`) is rejected with `OOM command not allowed`.

Verification & Guardrails

  • `CONFIG SET` is runtime-only; persist changes in `redis.conf` (`maxmemory-policy allkeys-lru`) or use your cloud provider's parameter group.
  • Verify with `redis-cli INFO stats | grep evicted_keys` after applying the policy; if evictions spike, raise `maxmemory` or reduce TTLs.
  • Add an `error` listener to your ioredis client to prevent the process from crashing on future Redis errors.

Have a custom or uncategorized crash?

Run your trace through our in-memory client privacy sandbox for instant SRE remediation.

Open Diagnostic Studio