zoukankan      html  css  js  c++  java
  • Redis——报错总结

    MISCONF Redis is configured to save RDB snapshots

    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.

    redis的空间不足够缓存,所以报错,解决方法如下临时修改,永久解决修改redis.conf中的stop-writes-on-bgsave-error

    redis 127.0.0.1:6379> config set stop-writes-on-bgsave-error no

    Redis server went away

    1.看redis服务是否启动,端口是否未开
    
    2.服务器端的防火墙是否关闭
    
    3.屏蔽redis.conf文件中bind 127.0.0.1

    Redis too many open files error

    服务器上默认的文件句柄1024,直接爆了

    查看句柄大小

    [root@ecs-4655-0531492 ~]# ulimit -a
    core file size (blocks, -c) 0
    data seg size (kbytes, -d) unlimited
    scheduling priority (-e) 0
    file size (blocks, -f) unlimited
    pending signals (-i) 127999
    max locked memory (kbytes, -l) 64
    max memory size (kbytes, -m) unlimited
    open files (-n) 1000000
    pipe size (512 bytes, -p) 8
    POSIX message queues (bytes, -q) 819200
    real-time priority (-r) 0
    stack size (kbytes, -s) 8192
    cpu time (seconds, -t) unlimited
    max user processes (-u) 1000000
    virtual memory (kbytes, -v) unlimited
    file locks (-x) unlimited

    设置大小

    [root@ecs-4655-0531492 ~]# ulimit -n 100000

    有时候设置没生效,直接写入配置文件就好

    vi /etc/security/limits.conf

    * soft nproc 1000000
    * hard nproc 1000000
    * soft nofile 1000000
    * hard nofile 1000000

  • 相关阅读:
    JDBC与ODBC的区别与应用
    java web项目中classes文件夹下的class和WEB-INF/lib中jar里的class文件加载顺序
    构造方法的继承
    2015-J. PUMA
    阶乘之和 南邮NOJ 1093
    阶乘之和 南邮NOJ 1093
    阶乘之和 南邮NOJ 1093
    阶乘之和 南邮NOJ 1093
    数的计算
    数的计算
  • 原文地址:https://www.cnblogs.com/wangyang0210/p/10116631.html
Copyright © 2011-2022 走看看