zoukankan      html  css  js  c++  java
  • redis报Cannot allocate memory错误

    昨天16:27开始将dp的日志使用ELK处理,当时redis使用内存的量不是很大,100M多点,结果今天早上到了一看xshell被关掉了,赶紧将各服务启动起来,elasticsearch启动没有问题,logstash indexer端启动时报错,redis插件连接不到,建议查看下redis的日志:

    1 A plugin had an unrecoverable error. Will restart this plugin.
    2   Plugin: <LogStash::Inputs::Redis host=>"10.132.24.166", type=>"redis-input", data_type=>"list", key=>"logstash", name=>"default">
    3   Error: MISCONF Redis is configured to save RDB snapshots, but is currently not able to persist on disk. Commands that may modify the data set are disabled. Please check Redis logs for details about the error. {:level=>:error}

    以为是redis挂掉了,查看端口,6379还在的,查看日志:

    redis 频繁报错日志:

    1 [7409] 12 Mar 09:57:11.069 * 1 changes in 900 seconds. Saving...
    2 [7409] 12 Mar 09:57:11.070 # Can't save in background: fork: Cannot allocate memory
    3 [7409] 12 Mar 09:57:17.086 * 1 changes in 900 seconds. Saving...
    4 [7409] 12 Mar 09:57:17.086 # Can't save in background: fork: Cannot allocate memory
    5 [7409] 12 Mar 09:57:23.100 * 1 changes in 900 seconds. Saving...

    top后显示VIRT:3758M,RES:3.5G

    参考:http://segmentfault.net/blog/koy/1190000000767465

    内核参数调整参考:https://www.kernel.org/doc/Documentation/vm/overcommit-accounting

    https://www.kernel.org/doc/Documentation/sysctl/vm.txt

    http://blog.sina.com.cn/s/blog_7429b9c801012evk.html

  • 相关阅读:
    python class属性
    获取安卓系统日志输出
    深入理解C#中的IDisposable接口(转)
    Mac开启自带的Apache服务器
    【转】《Unity Shader入门精要》冯乐乐著 书中彩图
    AssetDatabase的方法总结
    C# 读写XML文件的方法
    tkinter模块常用参数(python3)
    Unity在Project视图里面显示文件的拓展名
    Git忽略提交规则
  • 原文地址:https://www.cnblogs.com/iuwai/p/4331795.html
Copyright © 2011-2022 走看看