Hi Colleagues,

We are running a Redis cache instance (Consuming as K8's Pod) with the version redis:5.0.9, and one of the Redis cache (AOF) is consumes more than 71GB .

71G appendonly.aof

We are trying to clean up the AOF file with the command "BGREWRITEAOF" , but the Cache (Logs) not getting cleared. Can you please suggest it here?

Comment From: sundb

Have you confirm that aof rewrite is completed? Can you give the info from redis-cli info persistence?

Comment From: thennetirajesh

Hi @sundb

Can you please find out the requested information

Persistence

loading:0 rdb_changes_since_last_save:311868557 rdb_bgsave_in_progress:0 rdb_last_save_time:1656581612 rdb_last_bgsave_status:ok rdb_last_bgsave_time_sec:-1 rdb_current_bgsave_time_sec:-1 rdb_last_cow_size:0 aof_enabled:1 aof_rewrite_in_progress:0 aof_rewrite_scheduled:0 aof_last_rewrite_time_sec:0 aof_current_rewrite_time_sec:-1 aof_last_bgrewrite_status:err aof_last_write_status:ok aof_last_cow_size:0 aof_current_size:75346528853 aof_base_size:68256253929 aof_pending_rewrite:0 aof_buffer_length:0 aof_rewrite_buffer_length:0 aof_pending_bio_fsync:0 aof_delayed_fsync:0

from the logs we could see permission error

1:M 15 Jul 2022 06:34:28.037 * Background append only file rewriting started by pid 1613837 1613837:C 15 Jul 2022 06:34:28.037 # Opening the temp file for AOF rewrite in rewriteAppendOnlyFile(): Permission denied 1:M 15 Jul 2022 06:34:28.070 # Background AOF rewrite terminated with error

Comment From: sundb

@thennetirajesh You can see from the logs that redis is unable to create the aof temporary file (no write permission), so you can check the permissions of the redis execution user.