redis - BLPOP 和 MISCONF 配置 Redis 保存 RDB 快照

标签 redis

我们在 ELK 堆栈中使用 Redis 来缓冲我们系统之间的消息 和 Elasticsearch 。消息由自定义 log4j-appender 推送到 redis 并由 logstash 弹出。

现在出现了问题:如果 redis 队列运行满(因为例如 Elasticsearch 没有运行),redis 切换到一个模式,不再允许持久更改。这是有道理的,但是从 Redis 弹出消息(因为例如 ES 再次启动)会减少 redis 中队列的大小。

如果队列已满,是否可以配置 redis 以允许 blpop?

最好的问候 本杰明

最佳答案

来自 redis.conf:

By default Redis will stop accepting writes if RDB snapshots are enabled (at least one save point) and the latest background save failed. This will make the user aware (in a hard way) that data is not persisting on disk properly, otherwise chances are that no one will notice and some disaster will happen.

在您的情况下,您应该禁用此选项:

config set stop-writes-on-bgsave-error no

修改这个选项后不要忘记重启redis。

关于redis - BLPOP 和 MISCONF 配置 Redis 保存 RDB 快照,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34307670/

相关文章:

在 Mac OS X 上用 C 语言编译 hiredis

redis - 将redis服务器从1.2.6更新到最新

database - 如何解析Redis AOF文件?

performance - 如何在 100% CPU 时提高 Redis 性能?分片?最快的 .Net 客户端?

ruby-on-rails - 对大量记录进行分页

php - SncRedisBundle (predis)-heroku : how to configure the DSN

java - 序列化外部库

javascript - 使用 promises 在 Node.js 中重写 Redis 调用

php - 使用 Redis 实现 PHP 与 socket.io/node.js 的通信

带有 Redis 的 Node.js - 排序集加法