Redis报错“ OOM command not allowed when used memory > 'maxmemory' ”

生产环境上遇到这个问题,控制台不停打印 “OOM command not allowed when used memory > ‘maxmemory‘ ”;

起初不知道是什么,经过一番搜索:

1.登陆redis客户端:./redis-cli -h IP -p port -a passwd

2.执行命令:redis>info memory

若配置文件中,最大内存的策略设置为 maxmemory-policy volatile-lru 此配置只是清楚设置过期时间的key值,然而本应用并没有设置过期时间。

可以修改为maxmemory-policy allkeys-lru,指明非活跃近期很少用的key值清除。

如果清理完redis还不行,就需要考虑扩容

Redis报错“ OOM command not allowed when used memory > 'maxmemory' ”

原文地址:https://www.cnblogs.com/easilyai/p/11717083.html

时间: 2024-08-29 10:28:49

Redis报错“ OOM command not allowed when used memory > 'maxmemory' ”的相关文章

redis内存不够 : OOM command not allowed when used memory > ‘maxmemory’

Redis内存不够,报错. 三种解决思路 注:如修改了配置文件需重启redis 1. 增加redis内存,修改redis.conf(集群中为redis-env.sh),默认为1024MB,增加到合适的内存. maxmemory 2gb 2. 修改redis存储策略 默认的redis设置是非常保守的,即内存超限后就不在存储,可以把策略修改为LRU算法(最近最少使用算法)--新存储的信息会替换掉旧的信息,从而不会是内存越线,修改redis.conf.这个必须结合业务场景,如果没有自动加载数据到red

Redis: OOM command not allowed when used memory > ‘maxmemory’

现象 日志里出现异常: OOM command not allowed when used memory > 'maxmemory' 原因 内存已满,不允许再存数据了,可以通过redis-cli 查看redis的具体信息 127.0.0.1:6379> info memory # Memory used_memory:4120248 used_memory_human:3.93M used_memory_rss:11509760 used_memory_peak:1977983104 used

Redis: OOM command not allowed when used memory > ‘maxmemory

Redis: OOM command not allowed when used memory > ‘maxmemory’ 解决方式: $ vim /etc/redis/6903.conf maxmemory 3gb maxmemory-policy allkeys-lru maxmemory-samples 5

安装redis报错 cc: command not found

1.下载redis后 make 编译时报错 cd src && make allmake[1]: Entering directory /root/jevel/redis-2.8.17/src'<br/>CC adlist.o<br/>/bin/sh: cc: command not found<br/>make[1]: *** [adlist.o] Error 127<br/>make[1]: Leaving directory/root/

报错:1130-host ... is not allowed to connect to this MySql server

解决方法: 1. 改表法. 可能是你的帐号不允许从远程登陆,只能在localhost.这个时候只要在localhost的那台电脑,登入mysql后,更改 "mysql" 数据库里的 "user" 表里的 "host" 项,从"localhost"改称"%" mysql -u root -pvmwaremysql>use mysql; mysql>update user set host = '%

安装MySQL-python报错error: command &#39;gcc&#39; failed with exit status 1

[[email protected] MySQL-python-1.2.3]# python setup.py install function) .... _mysql.c:133: error: 'ER_SYNTAX_ERROR' undeclared (first use in this function) _mysql.c:380: error: '_mysql_ConnectionObject' has no member named 'connection' _mysql.c:382

nagios报错NRPE: Command &#39;check_heartbeat&#39; not defined

最近在做heartbeat监控的时候,在nagios服务器端报警提示:NRPE: Command 'check_heartbeat' not defined 但是在nagios客户端/usr/local/nagios/libexec/check_nrpe -H 192.168.3.211 -c check_heartbeat都能够正常执行,查了很多资料主要有以下几种情况: 1.nagios客户端nrpe.cfg配置文件命令写错 2.nagios客户端libexec下没有此命令 我的都不是上述两种

mac brew install redis 报错

mac brew install redis 报错 /usr/local/opt/php55/bin/phpize /usr/local/opt/php55/bin/phpize: line 61: /usr/local/Library/ENV/4.3/sed: No such file or directory /usr/local/opt/php55/bin/phpize: line 62: /usr/local/Library/ENV/4.3/sed: No such file or di

shell脚本在cygwin下运行报错: $&#39;\r&#39;: command not found

在cygwin 下运行shell脚本,出现"$'\r': command not found",这是win dos与Unix文本编辑方式不同造成的.可以使用cygwin工具dos2unix将script改为unix格式. $ dos2unix test.sh dos2unix: converting file test.sh to UNIX format ... $ sh test.sh 如此便可解决. 参见:http://lxs647.iteye.com/blog/2084375 s