Hey all, running into an issue with AOF disk space. I was under the impression compaction is run in the background to prevent this from happening, but now this has been happening around once every few weeks across our cluster and it's worth trying to figure it out.

Here's my question: https://stackoverflow.com/questions/66480305/redis-unable-to-write-to-aof-due-to-disk-space-even-though-compaction-should-occ

One suspicion I have is the log is being written to and is hitting a limit faster than the compaction process takes from the time it is triggered, so is there a way to decrease the threshold that triggers automatic compaction?

Thanks, Ishaan

Comment From: yossigo

@ishaantaylor AOF rewrite does take place in the background, based on configuration. The sample configuration file refer to this:

# Automatic rewrite of the append only file.
# Redis is able to automatically rewrite the log file implicitly calling
# BGREWRITEAOF when the AOF log size grows by the specified percentage.
#
# This is how it works: Redis remembers the size of the AOF file after the
# latest rewrite (if no rewrite has happened since the restart, the size of
# the AOF at startup is used).
#
# This base size is compared to the current size. If the current size is
# bigger than the specified percentage, the rewrite is triggered. Also
# you need to specify a minimal size for the AOF file to be rewritten, this
# is useful to avoid rewriting the AOF file even if the percentage increase
# is reached but it is still pretty small.
#
# Specify a percentage of zero in order to disable the automatic AOF
# rewrite feature.

auto-aof-rewrite-percentage 100
auto-aof-rewrite-min-size 64mb

Comment From: itamarhaber

Closing this as answered - feel free to reopen if needed.