You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using custom command-line arguments for redis-server to disable snapshotting, saving and persistence. Concretely, I have a Dockerfile that derives from :alpine that specifies a custom command:
FROM redis:6.2.6-alpine
# Disable `redis` Snapshotting, by defaultCMD ["redis-server", "--save", "", "--appendonly", "no"]
This Dockerfile works as expected and I no longer see any routine snapshot saving or dumping to /data when the container halts. However, this warning about vm.overcommit_memory continues to be written to the container's logs:
WARNING overcommit_memory is set to 0! Background save may fail under low memory condition.
To fix this issue add 'vm.overcommit_memory = 1' to /etc/sysctl.conf and then reboot or run the
command 'sysctl vm.overcommit_memory=1' for this to take effect.
Because the warning says, "background save may fail," I assume that this warning is erroneous because background saving is not enabled. This warning should therefore not be written to the logs in this case.
I know there are exactly N+1 issues about this warning, already, including #55, and, very recetly, #298 . I have read them and, so far, have yet to see one that covers this particular case, where persistence and background saving is actually not enabled and the warning continues to be displayed. False-positive warnings in logs are bad, as a rule, because they breed complacency from admins.
Of course, if there is some reason why vm.overcommit_memory should be enabled despite the fact that background saving is not, then the warning's wording should be altered to reflect that case. (Note: I am using Redis for caching, only, and need no persistence. In fact, persistence is actively undesirable in my scenario.)
The text was updated successfully, but these errors were encountered:
Unfortunately, this warning is printed by Redis itself, so I would suggest that this is an enhancement suggestion that should be filed at https://github.com/redis/redis (there's not anything we could do to remove that warning at the Docker image level). 😅
@tianon : Thanks. I did not even notice that I was on the wrong repo. I guess I just posted this issue in the repo. that the other, oft-cited, related issues were filed.
I am using custom command-line arguments for
redis-server
to disable snapshotting, saving and persistence. Concretely, I have a Dockerfile that derives from:alpine
that specifies a custom command:This Dockerfile works as expected and I no longer see any routine snapshot saving or dumping to
/data
when the container halts. However, this warning aboutvm.overcommit_memory
continues to be written to the container's logs:Because the warning says, "background save may fail," I assume that this warning is erroneous because background saving is not enabled. This warning should therefore not be written to the logs in this case.
I know there are exactly N+1 issues about this warning, already, including #55, and, very recetly, #298 . I have read them and, so far, have yet to see one that covers this particular case, where persistence and background saving is actually not enabled and the warning continues to be displayed. False-positive warnings in logs are bad, as a rule, because they breed complacency from admins.
Of course, if there is some reason why
vm.overcommit_memory
should be enabled despite the fact that background saving is not, then the warning's wording should be altered to reflect that case. (Note: I am using Redis for caching, only, and need no persistence. In fact, persistence is actively undesirable in my scenario.)The text was updated successfully, but these errors were encountered: