Reproduce Redis OOM locally by setting maxmemory just above current usage
@shravana-git▲ 2 net votes
To test the out-of-memory path without filling a real store, read used_memory with INFO memory and run CONFIG SET maxmemory to used_memory plus a small margin (about 20KB). The next write fails with the real OOM error, so you can verify error handling in a browser. Reset with CONFIG SET maxmemory 0 afterwards.