REDIS持久化报错失败

redis log报错:
[7666] 15 Jan 00:22:36.028 # Error moving temp DB file on the final destination: Invalid cross-device link
[1937] 15 Jan 00:22:36.513 # Background saving error
[1937] 15 Jan 00:22:36.614 * 1 changes in 900 seconds. Saving...

[7679] 15 Jan 00:27:15.659 # WARNING overcommit_memory is set to 0! Background save may fail under low memory condition. To fix this issue add ‘vm.overcommit_memory = 1‘ to /etc/sysctl.conf and then reboot or run the command ‘sysctl vm.overcommit_memory=1‘ for this to take effect.
[7679] 15 Jan 00:27:35.287 * DB loaded from disk: 19.629 seconds

处理方案:
根据提示,在配置文件/etc/sysctl.conf中加入:
vm.overcommit_memory=1

重启REDIS即可

关于overcommit_memory说明:
取值为0,系统在为应用进程分配虚拟地址空间时,会判断当前申请的虚拟地址空间大小是否超过剩余内存大小,如果超过,则虚拟地址空间分配失败。因此,也就是如果进程本身占用的虚拟地址空间比较大或者剩余内存比较小时,fork、malloc等调用可能会失败。
取值为1,系统在为应用进程分配虚拟地址空间时,完全不进行限制,这种情况下,避免了fork可能产生的失败,但由于malloc是先分配虚拟地址空间,而后通过异常陷入内核分配真正的物理内存,在内存不足的情况下,这相当于完全屏蔽了应用进程对系统内存状态的感知,即malloc总是能成功,一旦内存不足,会引起系统OOM杀进程,应用程序对于这种后果是无法预测的
取值为2,则是根据系统内存状态确定了虚拟地址空间的上限,由于很多情况下,进程的虚拟地址空间占用远大小其实际占用的物理内存,这样一旦内存使用量上去以后,对于一些动态产生的进程(需要复制父进程地址空间)则很容易创建失败,如果业务过程没有过多的这种动态申请内存或者创建子进程,则影响不大,否则会产生比较大的影响

时间: 2024-08-06 16:04:23

REDIS持久化报错失败的相关文章

redis安装报错

在centos6.6 x86_64安装redis的报错及解决方法: 1.make的时候注意: 如果make的时候提示如下错误: cc: error: ../deps/hiredis/libhiredis.a: No such file or directory cc: error: ../deps/lua/src/liblua.a: No such file or directory cc: error: ../deps/jemalloc/lib/libjemalloc.a: No such f

Redis 安装报错 You need tcl 8.5 or newer in order to run the Redis test

安装Redis测试报错: 解决: wget http://downloads.sourceforge.net/tcl/tcl8.6.1-src.tar.gz sudo tar xzvf tcl8.6.1-src.tar.gz -C /usr/local/ cd /usr/local/tcl8.6.1/unix/ sudo ./configure sudo make sudo make install 原文地址:https://www.cnblogs.com/-666/p/11247818.htm

ActiveMQ中使用mysql做持久化报错:Cannot execute statement: impossible to write to binary log since BINLOG_FORM

ActiveMQ中如果使用mysql innodb的同时,开启了binlog,那么在ack消息的时候,日志里就可会报错:java.sql.SQLException: Cannot execute statement: binlogging impossible since BINLOG_FORMAT = STATEMENT and at least one table uses a storage engine limited to row-logging. InnoDB is limited

Redis启动报错 linux64目录 /libX11.so.6: undefined symbol: xcb_wait_for_reply64 解决

Redis-desktop-manager一次安装后启动报错经历 解决: 删除libxcb.so.1 删除 RedisDesktop安装目录\lib\libxcb.so.1  文件解决. 详细: 最近因为装黑苹果后固态硬盘分配不合理重装了 debian ,在下载Redis-desktop时发现在github上之前开放的deb版本陆陆续续关闭了,翻了历史版本好久才翻到一个64位的RedisManager(百度云备份以备不时之需:链接: [      https://pan.baidu.com/s/

Redis 安装报错 error: jemalloc/jemalloc.h: No such file or directory解决方法

错误描述 安装Redis 2.8.18时报错: zmalloc.h:50:31: error: jemalloc/jemalloc.h: No such file or directory zmalloc.h:55:2: error: #error "Newer version of jemalloc required" make[1]: *** [adlist.o] Error 1 make[1]: Leaving directory `/data0/src/redis-2.6.2/

redis 安装报错 jemalloc/jemalloc.h: No such file or directory。

对于redis安装的这个错误,我在博客redis 安装 与错误解决办法最后有提及,但是网上大部分文章的对这个问题的解答都是有误的.所以在这里单列出来. 错误内容: jemalloc/jemalloc.h: No such file or directory. 文档 针对这个错误,我们可以在README.md 文件中看到解释. --------- Selecting a non-default memory allocator when building Redis is done by sett

CentOs7下php7装redis拓展报错

遇到PHP Startup: Unable to load dynamic library:undefined symbol: zval_used_for_init in Unknown on line 0问题 综合网上的一些答案,提出两个解决办法: 1.redis版本太老,可以去http://pecl.php.net/package/redis下载较新版本,我的是3.16 2.在redis源码包中make && make install 前没有加make clean,特别是在php版本升

启动redis报错:...‘vm-enabled no‘...

启动 redis 发现报错: [[email protected] ~]# service redis start Starting redis-server: *** FATAL CONFIG FILE ERROR *** Reading the configuration file, at line 375 >>> 'vm-enabled no' Bad directive or wrong number of arguments [FAILED] ===解决方法=== redis

连接redis报错MISCONF Redis is configured to save RDB s

连接redis报错MISCONF Redis is configured to save RDB snapshots date: Mon Nov 11 16:11:24 CST 2019 笔者:张首富 程序报错如下 redis.exceptions.ResponseError: MISCONF Redis is configured to save RDB snapshots, but it is currently not able to persist on disk. Commands t