分析Redis错误日志“加载Redis正在内存中加载数据集”等

vatpfxk5  于 2022-12-26  发布在  Redis
关注(0)|答案(1)|浏览(1579)

我经常在redis日志中看到这些消息

1号

602854:M 23 Dec 2022 09:48:54.028 * 10 changes in 300 seconds. Saving...
602854:M 23 Dec 2022 09:48:54.035 * Background saving started by pid 3266364
3266364:C 23 Dec 2022 09:48:55.844 * DB saved on disk
3266364:C 23 Dec 2022 09:48:55.852 * RDB: 12 MB of memory used by copy-on-write
602854:M 23 Dec 2022 09:48:55.938 * Background saving terminated with success

2号

LOADING Redis is loading the dataset in memory

三号

7678:signal-handler (1671738516) Received SIGTERM scheduling shutdown...
7678:M 22 Dec 2022 23:48:36.300 # User requested shutdown...
7678:M 22 Dec 2022 23:48:36.300 # systemd supervision requested, but NOTIFY_SOCKET not found
7678:M 22 Dec 2022 23:48:36.300 * Saving the final RDB snapshot before exiting.
7678:M 22 Dec 2022 23:48:36.300 # systemd supervision requested, but NOTIFY_SOCKET not found
7678:M 22 Dec 2022 23:48:36.720 * DB saved on disk
7678:M 22 Dec 2022 23:48:36.720 * Removing the pid file.
7678:M 22 Dec 2022 23:48:36.720 # Redis is now ready to exit, bye bye...
7901:C 22 Dec 2022 23:48:37.071 # WARNING supervised by systemd - you MUST set appropriate values for TimeoutStartSec and TimeoutStopSec in your service unit.
7901:C 22 Dec 2022 23:48:37.071 # systemd supervision requested, but NOTIFY_SOCKET not found
7914:C 22 Dec 2022 23:48:37.071 # oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
7914:C 22 Dec 2022 23:48:37.071 # Redis version=6.0.9, bits=64, commit=00000000, modified=0, pid=7914, just started
7914:C 22 Dec 2022 23:48:37.071 # Configuration loaded

这些信息是关于什么的吗?
让我知道,如果有任何优化进行方面的设置。

mum43rcc

mum43rcc1#

第一组信息与Redis持久性有关:你的Redis节点被配置为在300秒内超过10次写操作时将数据库保存到磁盘。你可以根据需要通过Redis配置文件进行更改。
另一方面,消息LOADING Redis is loading the dataset in memory是一条错误消息,当试图连接一个Redis示例时,该示例正在内存中加载其数据集:这发生在独立服务器和主节点的启动过程中,或者副本重新连接并与主节点完全重新同步时。如果您经常看到这个错误,并且不是在系统重新启动后,我建议您检查系统日志文件,了解为什么您的Redis示例重新启动或重新同步(取决于您的拓扑结构)。

相关问题