Skip to content
New issue

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

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

Already on GitHub? # to your account

Suggest better redis configuration for on-premises deployment #28

Open
rafaelrenanpacheco opened this issue May 4, 2020 · 1 comment

Comments

@rafaelrenanpacheco
Copy link
Contributor

rafaelrenanpacheco commented May 4, 2020

Hello!

On a fresh Centos7 install, running the on-premises docker-compose shows the following log for the redis container:

oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1, just started
Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
Not listening to IPv6: unsupproted
Running mode=standalone, port=6379.
WARNING: The TCP backlog setting of 511 cannot be enforced because /proc/sys/net/core/somaxconn is set to the lower value of 128.
Server initialized
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.
Ready to accept connections

The last two warning can be fixed with the following configuration in the OS:

cat <<EOF > /etc/sysctl.d/redis.conf
net.core.somaxconn=511
vm.overcommit_memory=1
EOF

sysctl --system

When running redis after this configuration it shows the following log:

oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo
Redis version=5.0.7, bits=64, commit=00000000, modified=0, pid=1, just started
Warning: no config file specified, using the default config. In order to specify a config file use redis-server /path/to/redis.conf
Not listening to IPv6: unsupproted
Running mode=standalone, port=6379.
Server initialized
DB loaded from disk: 0.000 seconds
Ready to accept connections

This way redis starts with the recommended configuration.

@micaelgallego
Copy link
Member

Thank you for helping us to create a better product. We will integrate it in the documentation.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants