我使用redis和node.js已经2年了,而且它从未被意外刷过 - redis提供了很好的持久性。
但是我看到了这些日志,发现redis被刷新了:
[1205] 08 Nov 06:05:02.256 - DB 0: 1322 keys (538 volatile) in 2048 slots HT.
[1205] 08 Nov 06:05:02.256 - 9 clients connected (0 slaves), 1574720 bytes in use
[1205] 08 Nov 06:05:07.262 - DB 0: 1327 keys (543 volatile) in 2048 slots HT.
[1205] 08 Nov 06:05:07.262 - 9 clients connected (0 slaves), 1575280 bytes in use
[1205] 08 Nov 06:05:09.749 - Accepted 222.190.111.119:37280
[1205] 08 Nov 06:05:09.791 * DB saved on disk
[1205] 08 Nov 06:05:09.861 - Client closed connection
[1205] 08 Nov 06:05:09.914 - Accepted 222.190.111.119:37288
[1205] 08 Nov 06:05:09.966 - Client closed connection
[1205] 08 Nov 06:05:10.019 - Accepted 222.190.111.119:37293
[1205] 08 Nov 06:05:10.069 - Client closed connection
[1205] 08 Nov 06:05:10.142 - Accepted 222.190.111.119:37299
[1205] 08 Nov 06:05:10.212 - Client closed connection
[1205] 08 Nov 06:05:10.267 - Accepted 222.190.111.119:37308
[1205] 08 Nov 06:05:10.319 - Client closed connection
[1205] 08 Nov 06:05:10.396 - Accepted 222.190.111.119:37323
[1205] 08 Nov 06:05:10.449 * DB saved on disk
[1205] 08 Nov 06:05:10.523 - Client closed connection
[1205] 08 Nov 06:05:10.577 - Accepted 222.190.111.119:37347
[1205] 08 Nov 06:05:10.629 - Client closed connection
[1205] 08 Nov 06:05:10.703 - Accepted 222.190.111.119:37354
[1205] 08 Nov 06:05:10.741 * DB saved on disk
[1205] 08 Nov 06:05:10.814 - Client closed connection
[1205] 08 Nov 06:05:10.870 - Accepted 222.190.111.119:37366
[1205] 08 Nov 06:05:10.921 - Client closed connection
[1205] 08 Nov 06:05:12.292 - DB 0: 2 keys (0 volatile) in 4 slots HT.
[1205] 08 Nov 06:05:12.292 - 9 clients connected (0 slaves), 990936 bytes in use
[1205] 08 Nov 06:05:17.299 - DB 0: 2 keys (0 volatile) in 4 slots HT.
[1205] 08 Nov 06:05:17.299 - 9 clients connected (0 slaves), 990936 bytes in use
[1205] 08 Nov 06:05:22.305 - DB 0: 2 keys (0 volatile) in 4 slots HT.
你可以在06:05:07看到它包含1327个键,突然有一些客户端关闭了连接事件,然后在06:05:12发现了2个键。
我正在使用node.js redis模块来处理redis,并且没有完全刷新redis的代码。
这可能是什么原因?