我想将redis数据库从一台服务器转移到另一台服务器。所以我在保存命令之后将dump.rdb传送到新服务器并作为dbfile放置。当我启动redis服务器时,一切似乎都运行良好一段时间; used_memory随着文件加载而增加:
127.0.0.1:6379> info
# Memory
used_memory:3142064944
used_memory_human:2.93G
used_memory_rss:0
used_memory_peak:3142064944
used_memory_peak_human:2.93G
used_memory_lua:33792
mem_fragmentation_ratio:0.00
mem_allocator:jemalloc-3.6.0
# Persistence
loading:1
127.0.0.1:6379> info
# Memory
used_memory:4164419680
used_memory_human:3.88G
used_memory_rss:0
used_memory_peak:4164419680
used_memory_peak_human:3.88G
used_memory_lua:33792
mem_fragmentation_ratio:0.00
mem_allocator:jemalloc-3.6.0
# Persistence
loading:1
几秒钟后,流程停止:
Could not connect to Redis at 127.0.0.1:6379: Connection refused
我认为重启redis服务器会从头开始重新启动db加载,无法完成
127.0.0.1:6379> keys *
(error) LOADING Redis is loading the dataset in memory
redis日志文件中没有任何内容。