更新时间:2022-08-16 GMT+08:00

访问Redis报OOM错误提示

问题描述

访问Redis返回Error in execution; nested exception is io.lettuce.core.RedisCommandExecutionException: OOM command not allowed when used memory > 'maxmemory'。

问题排查

OOM代表的就是超过了最大内存,报错中OOM command not allowed when used memory > 'maxmemory'的‘maxmemory’这个参数是Redis服务端对最大内存的配置,可以看到这是内存使用满了。

若Redis实例内存使用率并未达到100%,有可能当前写入数据的那个节点的mem达到最大值。通过redis-cli -h <redis_ip> -p 6379 -a <redis_password> -c --bigkeys连接到集群的各个节点进行分析。如果连接的从节点,需要在执行bigkeys命令之前,先发送READONLY命令。

Redis使用 所有常见问题

more