Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

Already on GitHub? Sign in to your account

Redis performs AOF operations even if "appendonly=no" #677

Closed
vsespb opened this Issue Sep 17, 2012 · 5 comments

Comments

Projects
None yet
2 participants

vsespb commented Sep 17, 2012

Redis 2.4.14
we have "save" directives commented out in config. we have "appendonly no"
but redist runs out of memory with the following in logs:

[25324] 15 Sep 06:00:18 * Background AOF rewrite successful
[25324] 15 Sep 08:00:01 * Background append only file rewriting started by pid 10945
[10945] 15 Sep 08:00:23 * SYNC append only file rewrite performed
[25324] 15 Sep 08:00:23 * Background AOF rewrite terminated with success
[25324] 15 Sep 08:00:23 * Parent diff successfully flushed to the rewritten AOF (0 bytes)
...
[25324] 15 Sep 14:00:34 * Background AOF rewrite terminated with success
[25324] 15 Sep 14:00:34 * Parent diff successfully flushed to the rewritten AOF (0 bytes)
[25324] 15 Sep 14:00:34 * Background AOF rewrite successful
[25324] 15 Sep 16:00:02 # Can't rewrite append only file in background: fork: Cannot allocate memory
[25324] 15 Sep 18:00:01 # Can't rewrite append only file in background: fork: Cannot allocate memory
[25324] 15 Sep 20:00:01 # Can't rewrite append only file in background: fork: Cannot allocate memory
[25324] 15 Sep 22:00:01 # Can't rewrite append only file in background: fork: Cannot allocate memory
[25324] 16 Sep 00:00:01 # Can't rewrite append only file in background: fork: Cannot allocate memory
[25324] 16 Sep 02:00:01 # Can't rewrite append only file in background: fork: Cannot allocate memory
...

(I know that I should use vm.overcommit_memory = 1 to avoid problems with fork(), but I prefer turn off forking in config if I don't actually need it, rather than workaround)

vsespb commented Oct 8, 2012

seems we had a cron task which executes redis-cli BGREWRITEAOF

if it's normal documented behaviour that BGREWRITEAOF writes AOF even if AOF disabled - please close the issue.

@mattsta mattsta closed this Aug 1, 2014

vsespb commented Aug 5, 2014

Hello. Why this issue closed?

Contributor

mattsta commented Aug 5, 2014

The appendonly config directive controls whether Redis writes the AOF journal for every incoming write command (much like how save enables Redis auto-saving snapshots).

If you comment out save, you can still always manually run BGSAVE, SAVE, SHUTDOWN SAVE, or even start replication which forces a BGSAVE to generate an RDB snapshot. So, commenting out save from a config doesn't stop any saving from manually being requested.

The same goes for appendonly—you can always BGREWRITEAOF to create a new AOF journal even when live per-incoming-command journal writing is disabled. To completely deny BGREWRITEAOF, just rename it to "" using the rename-command directive in your config.

vsespb commented Aug 5, 2014

Ok, thank you for explanation!

@Hailei Hailei pushed a commit to Hailei/redis that referenced this issue Aug 29, 2014

@HeartSaVioR HeartSaVioR Merge pull request #677 from macgngsta/master
Fixed Gradle build file
4f69387
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment