Skip to content
New issue

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

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

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
Closed

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

vsespb opened this issue Sep 17, 2012 · 5 comments

Comments

@vsespb
Copy link

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
Copy link
Author

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.

@vsespb
Copy link
Author

vsespb commented Oct 9, 2012

found similar issue http://code.google.com/p/redis/issues/detail?id=428

@mattsta mattsta closed this as completed Aug 1, 2014
@vsespb
Copy link
Author

vsespb commented Aug 5, 2014

Hello. Why this issue closed?

@mattsta
Copy link
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
Copy link
Author

vsespb commented Aug 5, 2014

Ok, thank you for explanation!

Hailei pushed a commit to Hailei/redis that referenced this issue Aug 29, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants