服務器異常重啟之后,在 啟動 redis 時,redis-server不斷的從日志文件加載數據到內存,到了6G左右時,redis-server 又掛了,再次啟動重復這個過程。查看日志,發現報錯:
Bad file format reading the append only file: make a backup of your AOF file, then use ./redis-check-aof --fix <filename>
處理方法:redis-check-aof --fix appendonly_6379.aof
然后啟動:redis-server:
redis-server /etc/redis-6379.conf &
ok,搞定。